aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-05-11 02:49:38 +0000
committerRoland McGrath <roland@gnu.org>1995-05-11 02:49:38 +0000
commit7e0e6f50070d1975226f2510a3e1c4200df02a90 (patch)
treeb1092dd1ae6e09eac331f11fcd262978c5520be0 /elf
parent99b306dc44a21202c8db071e3565235d8f946bbd (diff)
downloadglibc-7e0e6f50070d1975226f2510a3e1c4200df02a90.zip
glibc-7e0e6f50070d1975226f2510a3e1c4200df02a90.tar.gz
glibc-7e0e6f50070d1975226f2510a3e1c4200df02a90.tar.bz2
misc
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/elf/Makefile b/elf/Makefile
index f6e94fa..ab44b29 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)%=%)