From ee6aec88f2ce64cbbc09ace5376b3a527513ca6f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 20 Nov 2005 17:58:23 +0000 Subject: fix up ifdef checks so dl_iterate_phdr is defined in all the proper objects --- ldso/ldso/Makefile.in | 2 +- ldso/ldso/dl-elf.c | 4 +++- 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) { -- cgit v1.2.3