]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Print the full name of the dynamic loader in the ld.so help message
authorFlorian Weimer <fweimer@redhat.com>
Thu, 8 Oct 2020 13:33:00 +0000 (15:33 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 8 Oct 2020 15:12:05 +0000 (17:12 +0200)
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>
elf/Makefile
elf/dl-usage.c

index 8cdc44fdf14a28fe17ee4dd7f04d36e869f07892..f10cc59e7cf2311d94e45765d6f8ba33d40b8327 100644 (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
index 8c24c13770500df997c15ac532a7750e19923906..1003a435bfc2b39ed7e0cb2ea696e1c3ddd34786 100644 (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);