diff options
author | Dan Albert <danalbert@google.com> | 2017-04-25 15:42:42 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2017-04-25 15:42:42 -0700 |
commit | db98fed03d4140bf71b6f87d9d5909f7736baa6c (patch) | |
tree | 3315098366666ebcaf33f1392e741e9abdbba8ea | |
parent | 5deddda68e780aaa26e4777378fee10d543eb719 (diff) | |
download | android_bionic-db98fed03d4140bf71b6f87d9d5909f7736baa6c.tar.gz android_bionic-db98fed03d4140bf71b6f87d9d5909f7736baa6c.tar.bz2 android_bionic-db98fed03d4140bf71b6f87d9d5909f7736baa6c.zip |
Make dl_iterate_phdr weak in libdl.
This needs to be defined as weak because it is also defined in libc.a.
Without this, static executables will have a multiple definition
error.
Test: make checkbuild
Bug: None
Change-Id: If2024ef4191c8ab7cf087d21d76fefdc92b58da1
-rw-r--r-- | libdl/libdl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libdl/libdl.c b/libdl/libdl.c index 6a95629db..f7ca3f190 100644 --- a/libdl/libdl.c +++ b/libdl/libdl.c @@ -128,6 +128,11 @@ _Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int* pcount) { } #endif +/* + * This needs to be defined as weak because it is also defined in libc.a. + * Without this, static executables will have a multiple definition error. + */ +__attribute__((__weak__)) int dl_iterate_phdr(int (*cb)(struct dl_phdr_info* info, size_t size, void* data), void* data) { return __loader_dl_iterate_phdr(cb, data); } |