Revert "Improve library lookup logic"
This reverts commit 455c145e3c
.
Bug: http://b/21876587
Bug: http://b/21153477
Bug: http://b/21171302
Bug: https://code.google.com/p/android/issues/detail?id=160921
Change-Id: Iad21ddfc1ac749d12bcb52384a8d937b307dd03b
This commit is contained in:
parent
455c145e3c
commit
d2c81ed000
@ -1393,19 +1393,7 @@ static soinfo *find_loaded_library_by_soname(const char* name) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint32_t target_sdk_version = get_application_target_sdk_version();
|
||||
|
||||
for (soinfo* si = solist; si != nullptr; si = si->next) {
|
||||
// If the library was opened under different target sdk version
|
||||
// skip this step and try to reopen it. The exceptions are
|
||||
// "libdl.so" and global group. There is no point in skipping
|
||||
// them because relocation process is going to use them
|
||||
// in any case.
|
||||
if (si != solist && (si->get_dt_flags_1() & DF_1_GLOBAL) == 0 &&
|
||||
si->is_linked() && si->get_target_sdk_version() != target_sdk_version) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const char* soname = si->get_soname();
|
||||
if (soname != nullptr && (strcmp(name, soname) == 0)) {
|
||||
return si;
|
||||
|
@ -21,10 +21,6 @@
|
||||
static std::atomic<uint32_t> g_target_sdk_version(__ANDROID_API__);
|
||||
|
||||
void set_application_target_sdk_version(uint32_t target) {
|
||||
// translate current sdk_version to platform sdk_version
|
||||
if (target == 0) {
|
||||
target = __ANDROID_API__;
|
||||
}
|
||||
g_target_sdk_version = target;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user