Merge "Lock on dl_interate_phdr"
This commit is contained in:
commit
83474cd387
@ -158,6 +158,11 @@ int dlclose(void* handle) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int dl_iterate_phdr(int (*cb)(dl_phdr_info* info, size_t size, void* data), void* data) {
|
||||||
|
ScopedPthreadMutexLocker locker(&g_dl_mutex);
|
||||||
|
return do_dl_iterate_phdr(cb, data);
|
||||||
|
}
|
||||||
|
|
||||||
void android_set_application_target_sdk_version(uint32_t target) {
|
void android_set_application_target_sdk_version(uint32_t target) {
|
||||||
// lock to avoid modification in the middle of dlopen.
|
// lock to avoid modification in the middle of dlopen.
|
||||||
ScopedPthreadMutexLocker locker(&g_dl_mutex);
|
ScopedPthreadMutexLocker locker(&g_dl_mutex);
|
||||||
|
@ -393,7 +393,7 @@ _Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int* pcount) {
|
|||||||
|
|
||||||
// Here, we only have to provide a callback to iterate across all the
|
// Here, we only have to provide a callback to iterate across all the
|
||||||
// loaded libraries. gcc_eh does the rest.
|
// loaded libraries. gcc_eh does the rest.
|
||||||
int dl_iterate_phdr(int (*cb)(dl_phdr_info* info, size_t size, void* data), void* data) {
|
int do_dl_iterate_phdr(int (*cb)(dl_phdr_info* info, size_t size, void* data), void* data) {
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
for (soinfo* si = solist; si != nullptr; si = si->next) {
|
for (soinfo* si = solist; si != nullptr; si = si->next) {
|
||||||
dl_phdr_info dl_info;
|
dl_phdr_info dl_info;
|
||||||
|
@ -428,6 +428,8 @@ void do_android_update_LD_LIBRARY_PATH(const char* ld_library_path);
|
|||||||
soinfo* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo);
|
soinfo* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo);
|
||||||
void do_dlclose(soinfo* si);
|
void do_dlclose(soinfo* si);
|
||||||
|
|
||||||
|
int do_dl_iterate_phdr(int (*cb)(dl_phdr_info* info, size_t size, void* data), void* data);
|
||||||
|
|
||||||
const ElfW(Sym)* dlsym_linear_lookup(const char* name, soinfo** found, soinfo* caller, void* handle);
|
const ElfW(Sym)* dlsym_linear_lookup(const char* name, soinfo** found, soinfo* caller, void* handle);
|
||||||
soinfo* find_containing_library(const void* addr);
|
soinfo* find_containing_library(const void* addr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user