}
static void* dlopen_ext(const char* filename, int flags,
- const android_dlextinfo* extinfo, soinfo* caller) {
+ const android_dlextinfo* extinfo, void* caller_addr) {
ScopedPthreadMutexLocker locker(&g_dl_mutex);
+ soinfo* caller = find_containing_library(caller_addr);
soinfo* result = do_dlopen(filename, flags, extinfo, caller);
if (result == nullptr) {
__bionic_format_dlerror("dlopen failed", linker_get_error_buffer());
void* android_dlopen_ext(const char* filename, int flags, const android_dlextinfo* extinfo) {
void* caller_addr = __builtin_return_address(0);
- soinfo* caller = find_containing_library(caller_addr);
- return dlopen_ext(filename, flags, extinfo, caller);
+ return dlopen_ext(filename, flags, extinfo, caller_addr);
}
void* dlopen(const char* filename, int flags) {
void* caller_addr = __builtin_return_address(0);
- soinfo* caller = find_containing_library(caller_addr);
- return dlopen_ext(filename, flags, nullptr, caller);
+ return dlopen_ext(filename, flags, nullptr, caller_addr);
}
void* dlsym(void* handle, const char* symbol) {