08bdd3d27d
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 <dlfcn.h> and <link.h>. Improve performance by eliminating redundant calculations of symbols' hash values.
20 lines
675 B
Makefile
20 lines
675 B
Makefile
# $Id: Makefile,v 1.24 1997/04/16 11:31:32 bde Exp $
|
|
PROG= ld.so
|
|
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 -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
|
|
BINDIR= /usr/libexec
|
|
INSTALLFLAGS+= -fschg -C # -C to install as atomically as possible
|
|
MLINKS= rtld.1 ld.so.1
|
|
|
|
.PATH: $(LDDIR) $(LDDIR)/$(MACHINE)
|
|
|
|
.include <bsd.prog.mk>
|