Revert "Revert "Fix dlsym(3) to do breadth first search.""
This reverts commit 1b1966d9448e979d1503a3d8843708bfa8880dc6.
Change-Id: I05d6d3481aaf8f3e260d2e5e950248519a1d347f
diff --git a/linker/dlfcn.cpp b/linker/dlfcn.cpp
index efb829e..8ebf357 100644
--- a/linker/dlfcn.cpp
+++ b/linker/dlfcn.cpp
@@ -111,8 +111,7 @@
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) {