From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH v3] elf: Install a symbolic link to ld.so as /usr/bin/ld.so
Date: Fri, 10 Dec 2021 10:48:21 +0100 [thread overview]
Message-ID: <8735n0dc4a.fsf@oldenburg.str.redhat.com> (raw)
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.
---
v2: Use $(make-link).
v3: Update NEWS entry.
NEWS | 3 +++
elf/Makefile | 7 ++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index 8744a92532..3a04befe8e 100644
--- 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
diff --git a/elf/Makefile b/elf/Makefile
index ef36008673..d0bb0daa7e 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)
next reply other threads:[~2021-12-10 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 9:48 Florian Weimer [this message]
2021-12-10 14:19 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735n0dc4a.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).