aboutsummaryrefslogtreecommitdiffstats
path: root/libdl
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2017-04-25 15:42:42 -0700
committerDan Albert <danalbert@google.com>2017-04-25 15:42:42 -0700
commitdb98fed03d4140bf71b6f87d9d5909f7736baa6c (patch)
tree3315098366666ebcaf33f1392e741e9abdbba8ea /libdl
parent5deddda68e780aaa26e4777378fee10d543eb719 (diff)
downloadandroid_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
Diffstat (limited to 'libdl')
-rw-r--r--libdl/libdl.c5
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);
}