OSDN Git Service

linker: the global group is added to all built-in namespaces
authorJiyong Park <jiyong@google.com>
Fri, 19 May 2017 16:01:24 +0000 (01:01 +0900)
committerJiyong Park <jiyong@google.com>
Fri, 4 Aug 2017 05:14:09 +0000 (14:14 +0900)
commit34a4acd801fbd401fcc3c62928effac7b161b1d8
tree393d9db021a3442df74a6342e6a022c2f575faf9
parentcc28f6ea099e667d69511a3a1b9ad72e46d6a971
linker: the global group is added to all built-in namespaces

With ld.config.txt, we now have multiple built-in namespaces other than
the default namespace. Libs (and their dependents) listed in LD_PRELOAD
must be visible to those additional namespaces as well.

This also adds a debugging only feature: path to the linker config file
can be customized via LD_CONFIG_FILE environment variable. This works
only for debuggable builds.

Bug: 38114603
Bug: 62815515
Test: 1. ./external/compiler-rt/lib/asan/scripts/asan_device_setup --lib
prebuilts/clang/host/linux-x86/clang-stable/lib64/clang/5.0/lib/linux
2. enable talkback shortcut
3. in the home screen, hold vol-up/down together
4. device does not reboots and talkback shortcut is toggled
Test: bionic-unit-tests and linker-unit-tests successful

Merged-In: I9a03591053f4a9caea82f0dcb23e7a3d324bb9bd
Change-Id: I9a03591053f4a9caea82f0dcb23e7a3d324bb9bd
(cherry picked from commit 02586a2a34e6acfccf359b94db840f422b6c0231)
17 files changed:
linker/Android.bp
linker/linker.cpp
linker/linker_main.cpp
linker/linker_main.h
linker/linker_namespaces.cpp
linker/linker_namespaces.h
linker/linker_phdr.cpp
tests/Android.bp
tests/dl_test.cpp
tests/libs/Android.bp
tests/libs/ld_config_test_helper.cpp [new file with mode: 0644]
tests/libs/ld_config_test_helper_lib1.cpp [new file with mode: 0644]
tests/libs/ld_config_test_helper_lib2.cpp [new file with mode: 0644]
tests/libs/ld_config_test_helper_lib3.cpp [new file with mode: 0644]
tests/libs/ld_preload_test_helper.cpp [new file with mode: 0644]
tests/libs/ld_preload_test_helper_lib1.cpp [new file with mode: 0644]
tests/libs/ld_preload_test_helper_lib2.cpp [new file with mode: 0644]