summaryrefslogtreecommitdiff
path: root/libc/misc/elf/dl-iterate-phdr.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-23 05:27:24 -0400
committerMike Frysinger <vapier@gentoo.org>2009-07-23 05:41:35 -0400
commitd5f4f963a2ea503c15e44c2a5e4f39691769413a (patch)
treeaeec4a16b5a58cfdc6ed2e0ba9125f66a4999ce3 /libc/misc/elf/dl-iterate-phdr.c
parentdbfc05d6ace2b56f539e199387ca40bc85e1ef64 (diff)
fix dl_iterate_phdr() for FDPIC systems
The dlpi_addr isn't a simple Elf_Addr type for FDPIC systems, so we can't just assign 0 to it to initialize. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libc/misc/elf/dl-iterate-phdr.c')
-rw-r--r--libc/misc/elf/dl-iterate-phdr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/misc/elf/dl-iterate-phdr.c b/libc/misc/elf/dl-iterate-phdr.c
index 6561ed69e..a7677f11f 100644
--- a/libc/misc/elf/dl-iterate-phdr.c
+++ b/libc/misc/elf/dl-iterate-phdr.c
@@ -62,7 +62,12 @@ dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
/* This entry describes this statically-linked program itself. */
struct dl_phdr_info info;
int ret;
+#ifdef __FDPIC__
+ info.dlpi_addr.map = NULL;
+ info.dlpi_addr.got_value = NULL;
+#else
info.dlpi_addr = 0;
+#endif
info.dlpi_name = "";
info.dlpi_phdr = _dl_phdr;
info.dlpi_phnum = _dl_phnum;