This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
FreeBSD port (51): creation of ld.so.1
- From: Bruno Haible <bruno at clisp dot org>
- To: Roland McGrath <roland at frob dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Thu, 5 Sep 2002 14:19:48 +0200 (CEST)
- Subject: FreeBSD port (51): creation of ld.so.1
On FreeBSD, only executables [ET_EXEC] can be executed by the kernel, not
shared libraries [ET_DYN]. Therefore the DSO ld.so.1 has to be transformed
from a shared library to an executable when it is built. Here is a patch
to allow a hook called POSTPROCESS_LD_SO, as well as additional Makefile
dependencies for ld.so.1. This patch is a nop for other platforms.
2002-09-04 Bruno Haible <bruno@clisp.org>
* elf/Makefile ($(objpfx)ld.so): Allow additional dependencies.
Invoke POSTPROCESS_LD_SO if defined.
diff -r -c3 glibc-20020828.bak/elf/Makefile glibc-20020828/elf/Makefile
*** glibc-20020828.bak/elf/Makefile Wed Aug 28 12:51:02 2002
--- glibc-20020828/elf/Makefile Fri Aug 30 11:08:48 2002
***************
*** 179,187 ****
-e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
> $@.lds
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ $(LDFLAGS-rtld) \
! $(filter-out $(map-file),$^) $(load-map-file) \
-Wl,-soname=$(rtld-installed-name) -T $@.lds
rm -f $@.lds
# interp.c exists just to get this string into the libraries.
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"'
--- 179,189 ----
-e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
> $@.lds
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ $(LDFLAGS-rtld) \
! $(filter-out $(map-file), $(objpfx)librtld.os $(ld-map)) \
! $(load-map-file) \
-Wl,-soname=$(rtld-installed-name) -T $@.lds
rm -f $@.lds
+ : $(POSTPROCESS_LD_SO)
# interp.c exists just to get this string into the libraries.
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"'