From 7e0e6f50070d1975226f2510a3e1c4200df02a90 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 11 May 1995 02:49:38 +0000 Subject: [PATCH] misc --- elf/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/elf/Makefile b/elf/Makefile index f6e94faf56..ab44b29361 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -27,11 +27,11 @@ extra-libs = libelf libdl libelf-routines := elf_hash libdl-routines := dlopen dlclose dlsym dlerror libdl-inhibit-o = $(filter-out .so,$(object-suffixes)) # Build only shared. -LDLIBS-dl.so := -lc -lld +LDFLAGS-dl.so := -e 0 # work around ld bug rtld-routines := rtld $(addprefix dl-,load lookup object reloc \ runtime sysdep error init fini) -distribute = $(rtld-routines:=.c) dynamic-link.h +distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h include ../Makeconfig @@ -48,4 +48,7 @@ $(objpfx)ld.so: $(rtld-routines:%=$(objpfx)%.so) \ $(LINK.o) -nostdlib -shared -o $@ \ '-Wl,-(' $^ -lgcc '-Wl,-)' -$(objpfx)libdl.so: $(common-objpfx)libc.so $(objpfx)ld.so +$(objpfx)libdl.so: $(objpfx)libdl_pic.a $(common-objpfx)libc.so $(objpfx)ld.so + $(patsubst %/,cd %;,$(objpfx)) \ + $(LINK.o) -shared -o $(@:$(objpfx)%=%) \ + $(LDFLAGS-dl.so) -Wl,--whole-archive $(^:$(objpfx)%=%) -- 2.11.4.GIT