From db98fed03d4140bf71b6f87d9d5909f7736baa6c Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 25 Apr 2017 15:42:42 -0700 Subject: 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 --- libdl/libdl.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libdl') 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); } -- cgit v1.2.3