loader: fix dlopen performance regression caused by fix for CVE-2017-0670
Fix for CVE-2017-0670 in lmp-mr1 branch caused significant slowdowns
on dlopens for libraries with large dependency trees. Modified
is_recursive check led to unecessary check of already linked libraries.
This change excludes already loaded and linked libraries from this check
since it is redundant - linker already did it while loading these
libraries.
Bug: 63658102
Test: run bionic-unit-tests --gtest_filter=dl*:Dl*
Test: manually check load times for libraries with large dependency trees.
Change-Id: Idf25376f4889c4430442ff16a16e1d79ccb77b27
1 file changed