From 4cb202902d23b3c487016e516c70640c774b90d8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Nov 1995 02:33:47 +0000 Subject: Thu Nov 16 06:07:49 1995 Roland McGrath * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start_cleanup): New function. (_dl_sysdep_start): Move cleanup code there. * Makeconfig (default-rpath): New variable. (link-libc): Use it. * elf/Makefile (ld.so): Pass -rpath=$(default-rpath). * elf/rtld.c (_dl_rpath): New variable. (_dl_start): Set it from rtld_map's DT_RPATH. Call _dl_setup_hash on rtld_map. (dl_main): Cache address of _exit in variable before relocating, and use that in later calls. Call _dl_sysdep_start_cleanup before relocating. Keep track of dependency order while loading; remove rtld_map from chain, and reinsert in proper order if there is a dependency on it. * sysdeps/generic/Makefile (make_siglist): Pass -DSIGNUM_H=... with config's signum.h location. * sysdeps/generic/make_siglist.c: Include SIGNUM_H to define signal numbers. (HAVE_STRSIGNAL, HAVE_PSIGNAL): Define these before including signame.c (main): Deansideclize output. * elf/dl-load.c (_dl_map_object): Use _dl_rpath variable in place of DEFAULT_RPATH macro. * elf/Makefile: Undo last change. * sysdeps/mach/hurd/dl-sysdep.c (free): Don't abort, just nop. --- Makeconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Makeconfig') diff --git a/Makeconfig b/Makeconfig index e716776cb9..a610d057f5 100644 --- a/Makeconfig +++ b/Makeconfig @@ -291,8 +291,15 @@ endif endif ifndef link-libc ifeq (yes,$(build-shared)) -link-libc = -Wl,-rpath-link=$(common-objdir) -Wl,-rpath=$(libdir) \ +link-libc = -Wl,-rpath-link=$(common-objdir) -Wl,-rpath=$(default-rpath) \ $(common-objpfx)libc.so $(gnulib) +# Choose the default search path for the dynamic linker based on +# where we will install libraries. +ifneq ($(libdir),$(slibdir)) +default-rpath = $(slibdir):$(libdir) +else +default-rpath = $(libdir) +endif else link-libc = $(common-objpfx)libc.a $(gnulib) $(common-objpfx)libc.a endif -- cgit v1.2.3