summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-06-03 23:36:35 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-06-03 23:36:35 +0000
commitbd6b849754386a1befa2c935cde3110cadf422c6 (patch)
treeed43eab1330d4f637c5fc543eb7cbe566c9a044a
parentbe15d16b7246e32a1e622d4442cf919646bc71a9 (diff)
parent1a586293400d0e1d73e6eb82f7dfe9d2d9ed3c4b (diff)
downloadbionic-bd6b849754386a1befa2c935cde3110cadf422c6.zip
bionic-bd6b849754386a1befa2c935cde3110cadf422c6.tar.gz
bionic-bd6b849754386a1befa2c935cde3110cadf422c6.tar.bz2
Merge "Remove an unused parameter from the dlopen implementation."
-rw-r--r--linker/dlfcn.cpp12
-rw-r--r--linker/linker.cpp2
-rw-r--r--linker/linker.h2
3 files changed, 6 insertions, 10 deletions
diff --git a/linker/dlfcn.cpp b/linker/dlfcn.cpp
index 7bcb59f..6d63ad6 100644
--- a/linker/dlfcn.cpp
+++ b/linker/dlfcn.cpp
@@ -65,10 +65,9 @@ void android_update_LD_LIBRARY_PATH(const char* ld_library_path) {
do_android_update_LD_LIBRARY_PATH(ld_library_path);
}
-static void* dlopen_ext(const char* filename, int flags, const android_dlextinfo* extinfo, const void* caller_addr) {
+static void* dlopen_ext(const char* filename, int flags, const android_dlextinfo* extinfo) {
ScopedPthreadMutexLocker locker(&g_dl_mutex);
- soinfo* caller_soinfo = find_containing_library(caller_addr);
- soinfo* result = do_dlopen(filename, flags, caller_soinfo, extinfo);
+ soinfo* result = do_dlopen(filename, flags, extinfo);
if (result == NULL) {
__bionic_format_dlerror("dlopen failed", linker_get_error_buffer());
return NULL;
@@ -77,13 +76,11 @@ static void* dlopen_ext(const char* filename, int flags, const android_dlextinfo
}
void* android_dlopen_ext(const char* filename, int flags, const android_dlextinfo* extinfo) {
- void* caller_addr = __builtin_return_address(0);
- return dlopen_ext(filename, flags, extinfo, caller_addr);
+ return dlopen_ext(filename, flags, extinfo);
}
void* dlopen(const char* filename, int flags) {
- void* caller_addr = __builtin_return_address(0);
- return dlopen_ext(filename, flags, NULL, caller_addr);
+ return dlopen_ext(filename, flags, NULL);
}
void* dlsym(void* handle, const char* symbol) {
@@ -258,4 +255,3 @@ soinfo* get_libdl_info() {
return &__libdl_info;
}
-
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 5452f30..a22233d 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -827,7 +827,7 @@ void do_android_update_LD_LIBRARY_PATH(const char* ld_library_path) {
}
}
-soinfo* do_dlopen(const char* name, int flags, soinfo* /*caller*/, const android_dlextinfo* extinfo) {
+soinfo* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo) {
if ((flags & ~(RTLD_NOW|RTLD_LAZY|RTLD_LOCAL|RTLD_GLOBAL|RTLD_NOLOAD)) != 0) {
DL_ERR("invalid flags to dlopen: %x", flags);
return NULL;
diff --git a/linker/linker.h b/linker/linker.h
index 9d4099d..0a72d92 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -231,7 +231,7 @@ extern soinfo* get_libdl_info();
void do_android_get_LD_LIBRARY_PATH(char*, size_t);
void do_android_update_LD_LIBRARY_PATH(const char* ld_library_path);
-soinfo* do_dlopen(const char* name, int flags, soinfo* caller, const android_dlextinfo* extinfo);
+soinfo* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo);
void do_dlclose(soinfo* si);
ElfW(Sym)* dlsym_linear_lookup(const char* name, soinfo** found, soinfo* start);