diff options
Diffstat (limited to 'libdl/libdl.c')
-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); } |