From: Florian Weimer Date: Thu, 8 Oct 2020 13:33:00 +0000 (+0200) Subject: elf: Print the full name of the dynamic loader in the ld.so help message X-Git-Tag: glibc-2.33~417 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db03874df9843ab98c4faeb658f04d17e6db83a6;p=thirdparty%2Fglibc.git 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 --- diff --git a/elf/Makefile b/elf/Makefile index 8cdc44fdf14..f10cc59e7cf 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 8c24c137705..1003a435bfc 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);