From e61aa81fab72cedfaad3a565fa3554e5175fd9c8 Mon Sep 17 00:00:00 2001 From: jdp Date: Sat, 29 Nov 1997 03:32:48 +0000 Subject: Get rid of the dynamic linker's internal malloc package, and arrange things so that it uses the same malloc as is used by the program being executed. This has several advantages, the big one being that you can now debug core dumps from dynamically linked programs and get useful information out of them. Until now, that didn't work. The internal malloc package placed the tables describing the loaded shared libraries in a mapped region of high memory that was not written to core files. Thus the debugger had no way of determining what was loaded where in memory. Now that the dynamic linker uses the application's malloc package (normally, but not necessarily, the system malloc), its tables end up in the regular heap area where they will be included in core dumps. The debugger now works very well indeed, thank you very much. Also ... Bring the program a little closer to conformance with style(9). There is still a long way to go. Add minimal const correctness changes to get rid of compiler warnings caused by the recent const changes in and . Improve performance by eliminating redundant calculations of symbols' hash values. --- libexec/rtld-aout/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libexec/rtld-aout/Makefile') diff --git a/libexec/rtld-aout/Makefile b/libexec/rtld-aout/Makefile index 4177f6b..13c8de8 100644 --- a/libexec/rtld-aout/Makefile +++ b/libexec/rtld-aout/Makefile @@ -1,13 +1,12 @@ -# $Id: Makefile,v 1.23 1997/02/22 15:46:46 peter Exp $ - +# $Id: Makefile,v 1.24 1997/04/16 11:31:32 bde Exp $ PROG= ld.so -SRCS= mdprologue.S rtld.c malloc.c shlib.c md.c support.c sbrk.c +SRCS= mdprologue.S rtld.c shlib.c md.c support.c MAN1= rtld.1 LDDIR?= $(.CURDIR)/.. # As there is relocation going on behind GCC's back, don't cache function addresses. PICFLAG=-fpic -fno-function-cse -CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE) $(PICFLAG) -DRTLD -LDFLAGS+=-nostdlib -Wl,-Bshareable -Wl,-Bsymbolic -Wl,-assert -Wl,nosymbolic +CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE) $(PICFLAG) -DRTLD -Wall +LDFLAGS+=-nostdlib -Wl,-Bshareable,-Bsymbolic,-assert,nosymbolic ASFLAGS+=-k DPADD+= ${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/} LDADD+= -lc_pic -lgcc_pic -- cgit v1.1