summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-20 17:58:23 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-20 17:58:23 +0000
commitee6aec88f2ce64cbbc09ace5376b3a527513ca6f (patch)
treeff8423a9646a2cfd64a13461b77aef06e1980ddb /ldso
parent100e79a3dfd1b1037c7300ba03f566c81f861fd1 (diff)
fix up ifdef checks so dl_iterate_phdr is defined in all the proper objects
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/Makefile.in2
-rw-r--r--ldso/ldso/dl-elf.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index c01c7f066..490770b3d 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -5,7 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CFLAGS-ldso := -DNOT_IN_libc -DIS_IN_rtld $(SSP_DISABLE_FLAGS)
+CFLAGS-ldso := -DNOT_IN_libc -DIS_IN_rtld $(SSP_DISABLE_FLAGS) -D_GNU_SOURCE
# This stuff will not work with -fomit-frame-pointer
CFLAGS-ldso += -fno-omit-frame-pointer
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index d7fd41edd..b942dd85b 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -793,8 +793,10 @@ void _dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void
{
__dl_parse_dynamic_info(dpnt, dynamic_info, debug_addr, load_off);
}
+
+/* we want this in ldso.so and libdl.a but nowhere else */
#ifdef __USE_GNU
-#if ! defined LIBDL || (! defined PIC && ! defined __PIC__)
+#if defined IS_IN_rtld || (defined IS_IN_libdl && ! defined SHARED)
int
__dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data)
{