aboutsummaryrefslogtreecommitdiff
path: root/elf/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-12-10 16:06:36 +0100
committerFlorian Weimer <fweimer@redhat.com>2021-12-10 16:06:58 +0100
commit2e75604f8337fa4332977f72a8f6726309679edf (patch)
treecd0a9951017b62dbead3179dd70cef81aab9b22f /elf/Makefile
parent5cc338565479a620244c2f8ff35956629c4dbf81 (diff)
downloadglibc-2e75604f8337fa4332977f72a8f6726309679edf.zip
glibc-2e75604f8337fa4332977f72a8f6726309679edf.tar.gz
glibc-2e75604f8337fa4332977f72a8f6726309679edf.tar.bz2
elf: Install a symbolic link to ld.so as /usr/bin/ld.so
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>
Diffstat (limited to 'elf/Makefile')
-rw-r--r--elf/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/elf/Makefile b/elf/Makefile
index ef36008..d0bb0da 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -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)