summaryrefslogtreecommitdiff
path: root/src/ldso
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-01-25 19:12:41 -0500
committerRich Felker <dalias@aerifal.cx>2016-01-25 19:12:41 -0500
commit16f70388d4a876c216cbf1d829782ace41a07634 (patch)
tree8c945c68b3f831243397f910281a017cfcc11d70 /src/ldso
parent4058795d4938ea72a27fb3231ce52c69c7e39637 (diff)
downloadmusl-16f70388d4a876c216cbf1d829782ace41a07634.tar.gz
musl-16f70388d4a876c216cbf1d829782ace41a07634.tar.bz2
musl-16f70388d4a876c216cbf1d829782ace41a07634.tar.xz
musl-16f70388d4a876c216cbf1d829782ace41a07634.zip
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.
Diffstat (limited to 'src/ldso')
-rw-r--r--src/ldso/dl_iterate_phdr.c7
1 files changed, 3 insertions, 4 deletions
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 <elf.h>
#include <link.h>
#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);