Revert "Bionic loader is no longer hijacking libdl.so"
This reverts commit c12acef96bd80c419654e159e1dc24a69513a86d.
Breaks the Mips build.
Bug: 27106625
Change-Id: I27edb7114065c36e1b618e387530d58189cdb184
diff --git a/linker/linker.cpp b/linker/linker.cpp
index cb658ba..62e6bb6 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -324,7 +324,9 @@
// in that section (via *pcount).
//
// Intended to be called by libc's __gnu_Unwind_Find_exidx().
-_Unwind_Ptr do_dl_unwind_find_exidx(_Unwind_Ptr pc, int* pcount) {
+//
+// This function is exposed via dlfcn.cpp and libdl.so.
+_Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int* pcount) {
uintptr_t addr = reinterpret_cast<uintptr_t>(pc);
for (soinfo* si = solist_get_head(); si != 0; si = si->next) {
@@ -1728,9 +1730,8 @@
info->library_namespace : nullptr);
}
-void* do_dlopen(const char* name, int flags,
- const android_dlextinfo* extinfo,
- const void* caller_addr) {
+void* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo,
+ void* caller_addr) {
soinfo* const caller = find_containing_library(caller_addr);
android_namespace_t* ns = get_caller_namespace(caller);
@@ -1854,11 +1855,8 @@
return static_cast<soinfo*>(handle);
}
-bool do_dlsym(void* handle,
- const char* sym_name,
- const char* sym_ver,
- const void* caller_addr,
- void** symbol) {
+bool do_dlsym(void* handle, const char* sym_name, const char* sym_ver,
+ void* caller_addr, void** symbol) {
#if !defined(__LP64__)
if (handle == nullptr) {
DL_ERR("dlsym failed: library handle is null");