[13/30] elf: Print the full name of the dynamic loader in the ld.so help message
Commit Message
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(-)
@@ -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
@@ -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);