summaryrefslogtreecommitdiff
path: root/elf/Makefile
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-05-02 06:35:55 +0000
committerRoland McGrath <roland@gnu.org>1995-05-02 06:35:55 +0000
commitd66e34cd423425c348bcc83df127dd19711b0b9a (patch)
tree97058e776d3b4fe06ef54bc4951596991652183f /elf/Makefile
parent08162fa888913a5153d2fcdc4e1a816b57b1fe56 (diff)
* sysdeps/mach/i386/sysdep.h (SNARF_ARGS, CALL_WITH_SP): Rewritten.
* sysdeps/i386/dl-machine.h: New file. * sysdeps/stub/dl-machine.h: New file. * sysdeps/i386/dl-runtime.c: New file. * sysdeps/stub/dl-runtime.c: New file. * sysdeps/i386/elf/start.S: New file. * sysdeps/generic/dl-sysdep.c: New file. * sysdeps/mach/hurd/dl-sysdep.c: New file.
Diffstat (limited to 'elf/Makefile')
-rw-r--r--elf/Makefile32
1 files changed, 30 insertions, 2 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 7dfb9ac37d..f6e94faf56 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -1,3 +1,5 @@
+# Makefile for elf subdirectory of GNU C Library.
+
# Copyright (C) 1995 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -16,8 +18,34 @@
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.
-subdir := elf
+subdir := elf
+
+headers := elf.h libelf.h link.h dlfcn.h
+routines := init-first
+
+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
+
+rtld-routines := rtld $(addprefix dl-,load lookup object reloc \
+ runtime sysdep error init fini)
+distribute = $(rtld-routines:=.c) dynamic-link.h
-headers := elf.h # libelf.h
+include ../Makeconfig
+
+ifeq (yes,$(build-shared))
+extra-objs = $(rtld-routines:=.so)
+install-lib = ld.so
+endif
include ../Rules
+
+$(objpfx)ld.so: $(rtld-routines:%=$(objpfx)%.so) \
+ $(patsubst %,$(common-objpfx)lib%_pic.a,\
+ elf c $(LDLIBS-c.so:-l%=%))
+ $(LINK.o) -nostdlib -shared -o $@ \
+ '-Wl,-(' $^ -lgcc '-Wl,-)'
+
+$(objpfx)libdl.so: $(common-objpfx)libc.so $(objpfx)ld.so