From: Rich Felker Date: Tue, 26 Jan 2016 00:12:41 +0000 (-0500) Subject: adapt static dl_iterate_phdr not to depend on !defined(SHARED) X-Git-Tag: v1.1.13~51 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=16f70388d4a876c216cbf1d829782ace41a07634;p=oweals%2Fmusl.git adapt static dl_iterate_phdr not to depend on !defined(SHARED) like elsewhere, use a weak alias that the dynamic linker will override with a more complete version capable of handling shared libraries. --- diff --git a/src/ldso/dl_iterate_phdr.c b/src/ldso/dl_iterate_phdr.c index 49b321a0..c141fd9b 100644 --- a/src/ldso/dl_iterate_phdr.c +++ b/src/ldso/dl_iterate_phdr.c @@ -1,12 +1,10 @@ -#ifndef SHARED - #include #include #include "libc.h" #define AUX_CNT 38 -int dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void *data), void *data) +static int static_dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void *data), void *data) { unsigned char *p; ElfW(Phdr) *phdr, *tls_phdr=0; @@ -40,4 +38,5 @@ int dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void } return (callback)(&info, sizeof (info), data); } -#endif + +weak_alias(static_dl_iterate_phdr, dl_iterate_phdr);