diff options
author | Dmitriy Ivanov <dimitry@google.com> | 2015-04-28 18:09:53 -0700 |
---|---|---|
committer | Dmitriy Ivanov <dimitry@google.com> | 2015-04-28 19:01:01 -0700 |
commit | 53ba6636178b7fb5d837b52aa6b2983263e3df4e (patch) | |
tree | e2ddaf33cdfdb8fcb1eb371878d32c7223e205b4 /linker/linker.cpp | |
parent | cb73d0e0daff3804092efd49abf3aab9a65c05ff (diff) | |
download | bionic-53ba6636178b7fb5d837b52aa6b2983263e3df4e.zip bionic-53ba6636178b7fb5d837b52aa6b2983263e3df4e.tar.gz bionic-53ba6636178b7fb5d837b52aa6b2983263e3df4e.tar.bz2 |
Fix LD_PRELOAD for dlopen()
We did not set DF_1_GLOBAL flag for LD_PRELOADed
libraries which led to the situation when ld_preloads
where ignored during on dlopen()
Change-Id: I696b3b2506a8ed4c0984ad2c803210a7a4f8e686
(cherry picked from commit f8093a9485402584f75b774ddf2ca051fa9b8aad)
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r-- | linker/linker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index be7b10c..bc16686 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -2444,7 +2444,7 @@ bool soinfo::prelink_image() { /* We can't log anything until the linker is relocated */ bool relocating_linker = (flags_ & FLAG_LINKER) != 0; if (!relocating_linker) { - INFO("[ linking %s ]", get_soname()); + INFO("[ linking %s ]", get_realpath()); DEBUG("si->base = %p si->flags = 0x%08x", reinterpret_cast<void*>(base), flags_); } @@ -3150,6 +3150,7 @@ static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args, ElfW( for (const auto& ld_preload_name : g_ld_preload_names) { needed_library_name_list.push_back(ld_preload_name.c_str()); ++needed_libraries_count; + ++ld_preloads_count; } for_each_dt_needed(si, [&](const char* name) { |