Fix dlsym(3) to do breadth first search.
dlsym(3) with handle != RTLD_DEFAULT|RTLD_NEXT performs
breadth first search through the dependency tree.
Bug: 16653281
(cherry picked from commit aa0f2bdbc2)
Change-Id: I0ba8c2034ab341f8a279cdb4e2e7e47f1aef7897
This commit is contained in:
@@ -111,8 +111,7 @@ void* dlsym(void* handle, const char* symbol) {
|
||||
sym = dlsym_linear_lookup(symbol, &found, caller_si->next, caller_si);
|
||||
}
|
||||
} else {
|
||||
found = reinterpret_cast<soinfo*>(handle);
|
||||
sym = dlsym_handle_lookup(found, symbol, caller_si);
|
||||
sym = dlsym_handle_lookup(reinterpret_cast<soinfo*>(handle), &found, symbol, caller_si);
|
||||
}
|
||||
|
||||
if (sym != NULL && sym->st_shndx != 0) {
|
||||
|
||||
Reference in New Issue
Block a user