[PATCH 13/30] elf: Print the full name of the dynamic loader in the ld.so help message
Florian Weimer
fweimer@redhat.com
Mon Jun 22 15:14:08 GMT 2020
This requires defining a macro for the full path, matching the
-Wl,--dynamic-link= arguments used for linking glibc programs,
and ldd script.
---
elf/Makefile | 3 ++-
elf/dl-usage.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/elf/Makefile b/elf/Makefile
index 85f7e08e00..d2f58c8ce6 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -648,7 +648,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 0a12c631a6..5caf9794c6 100644
--- a/elf/dl-usage.c
+++ b/elf/dl-usage.c
@@ -75,6 +75,8 @@ setting environment variables (which would be inherted by subprocesses).\n\
--preload LIST preload objects named in LIST\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 (0);
--
2.25.4
More information about the Libc-alpha
mailing list