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>
This commit is contained in:
Florian Weimer 2020-10-08 15:33:00 +02:00
parent ca52c56abf
commit db03874df9
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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);