From 2f978feb67c29ce3eb866aa719ed75ebdaabf4d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Feb 2007 15:17:30 +0000 Subject: [PATCH] * elf/rtld.c (RESOLVE_MAP): Always return bootstrap_map reference. * elf/Makefile ($(objpfx)ld.so): Check that ld.so has no undefined references. --- ChangeLog | 6 ++++++ elf/Makefile | 3 ++- elf/rtld.c | 9 +++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07fe6a9..6a2d824 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-12 Ulrich Drepper + + * elf/rtld.c (RESOLVE_MAP): Always return bootstrap_map reference. + * elf/Makefile ($(objpfx)ld.so): Check that ld.so has no undefined + references. + 2007-02-09 Ulrich Drepper * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Remove incorrect comment. diff --git a/elf/Makefile b/elf/Makefile index afebaec..1c5b169 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1995-2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 1995-2004, 2005, 2006, 2007 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -307,6 +307,7 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map) $(filter-out $(map-file),$^) $(load-map-file) \ -Wl,-soname=$(rtld-installed-name) -T $@.lds rm -f $@.lds + nm -u $@ | cmp -s /dev/null - # interp.c exists just to get this string into the libraries. CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \ diff --git a/elf/rtld.c b/elf/rtld.c index 5e6ee51..c57ef17 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1,5 +1,5 @@ /* Run time dynamic linker. - Copyright (C) 1995-2002,2003,2004,2005,2006 Free Software Foundation, Inc. + Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -359,10 +359,11 @@ _dl_start (void *arg) #endif /* This #define produces dynamic linking inline functions for - bootstrap relocation instead of general-purpose relocation. */ + bootstrap relocation instead of general-purpose relocation. + Since ld.so must not have any undefined symbols the result + is trivial: always the map of ld.so itself. */ #define RTLD_BOOTSTRAP -#define RESOLVE_MAP(sym, version, flags) \ - ((*(sym))->st_shndx == SHN_UNDEF ? 0 : &bootstrap_map) +#define RESOLVE_MAP(sym, version, flags) (&bootstrap_map) #include "dynamic-link.h" if (HP_TIMING_INLINE && HP_TIMING_AVAIL) -- 2.7.4