]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Install a symbolic link to ld.so as /usr/bin/ld.so
authorFlorian Weimer <fweimer@redhat.com>
Fri, 10 Dec 2021 15:06:36 +0000 (16:06 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 10 Dec 2021 15:06:58 +0000 (16:06 +0100)
This makes ld.so features such as --preload, --audit,
and --list-diagnostics more accessible to end users because they
do not need to know the ABI name of the dynamic loader.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
NEWS
elf/Makefile

diff --git a/NEWS b/NEWS
index 8744a92532b4cefb43981ff85628650d9557c729..3a04befe8e4df33e8159c65081b090408b3f3e41 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -79,6 +79,9 @@ Major new features:
   variables.  The GNU C Library manual has details on integration of
   Restartable Sequences.
 
+* A symbolic link to the dynamic linker is now installed under
+  /usr/bin/ld.so (or more precisely, '${bindir}/ld.so').
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * The r_version update in the debugger interface makes the glibc binary
index ef3600867310594a3cd13bd6d7ac31572d2dedc7..d0bb0daa7e3091573b8d22a1ba90e65c0a3858ed 100644 (file)
@@ -110,7 +110,7 @@ endif
 ifeq (yes,$(build-shared))
 extra-objs     = $(all-rtld-routines:%=%.os) sofini.os interp.os
 generated      += librtld.os dl-allobjs.os ld.so ldd
-install-others = $(inst_rtlddir)/$(rtld-installed-name)
+install-others = $(inst_rtlddir)/$(rtld-installed-name) $(inst_bindir)/ld.so
 install-bin-script = ldd
 endif
 
@@ -692,6 +692,11 @@ $(inst_rtlddir)/$(rtld-installed-name): $(objpfx)ld.so $(+force)
        $(make-target-directory)
        $(do-install-program)
 
+# Creates the relative /usr/bin/ld.so symbolic link.
+$(inst_bindir)/ld.so: $(inst_rtlddir)/$(rtld-installed-name)
+       $(make-target-directory)
+       $(make-link)
+
 # Special target called by parent to install just the dynamic linker.
 .PHONY: ldso_install
 ldso_install: $(inst_rtlddir)/$(rtld-installed-name)