public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] elf: Print the full name of the dynamic loader in the ld.so help message
@ 2020-10-08 15:31 Florian Weimer
0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2020-10-08 15:31 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=db03874df9843ab98c4faeb658f04d17e6db83a6
commit db03874df9843ab98c4faeb658f04d17e6db83a6
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Oct 8 15:33:00 2020 +0200
elf: Print the full name of the dynamic loader in the ld.so help message
This requires defining a macro for the full path, matching the
-Wl,--dynamic-link= arguments used for linking glibc programs,
and ldd script.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diff:
---
elf/Makefile | 3 ++-
elf/dl-usage.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/elf/Makefile b/elf/Makefile
index 8cdc44fdf1..f10cc59e7c 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -661,7 +661,8 @@ libof-ldconfig = ldconfig
CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
CFLAGS-cache.c += $(SYSCONF-FLAGS)
CFLAGS-rtld.c += $(SYSCONF-FLAGS)
-CFLAGS-dl-usage.c += $(SYSCONF-FLAGS)
+CFLAGS-dl-usage.c += $(SYSCONF-FLAGS) \
+ -D'RTLD="$(rtlddir)/$(rtld-installed-name)"'
cpp-srcs-left := $(all-rtld-routines:=.os)
lib := rtld
diff --git a/elf/dl-usage.c b/elf/dl-usage.c
index 8c24c13770..1003a435bf 100644
--- a/elf/dl-usage.c
+++ b/elf/dl-usage.c
@@ -76,6 +76,8 @@ setting environment variables (which would be inherited by subprocesses).\n\
--argv0 STRING set argv[0] to STRING before running\n\
--help display this help and exit\n\
--version output version information and exit\n\
+\n\
+This program interpreter self-identifies as: " RTLD "\n\
",
argv0);
_exit (EXIT_SUCCESS);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-08 15:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 15:31 [glibc] elf: Print the full name of the dynamic loader in the ld.so help message Florian Weimer
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).