|
|
b1dca6 |
commit db03874df9843ab98c4faeb658f04d17e6db83a6
|
|
|
b1dca6 |
Author: Florian Weimer <fweimer@redhat.com>
|
|
|
b1dca6 |
Date: Thu Oct 8 15:33:00 2020 +0200
|
|
|
b1dca6 |
|
|
|
b1dca6 |
elf: Print the full name of the dynamic loader in the ld.so help message
|
|
|
b1dca6 |
|
|
|
b1dca6 |
This requires defining a macro for the full path, matching the
|
|
|
b1dca6 |
-Wl,--dynamic-link= arguments used for linking glibc programs,
|
|
|
b1dca6 |
and ldd script.
|
|
|
b1dca6 |
|
|
|
b1dca6 |
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
b1dca6 |
|
|
|
b1dca6 |
diff --git a/elf/Makefile b/elf/Makefile
|
|
|
b1dca6 |
index e5666e5bf7817c3c..bc96b8fd65e376cc 100644
|
|
|
b1dca6 |
--- a/elf/Makefile
|
|
|
b1dca6 |
+++ b/elf/Makefile
|
|
|
b1dca6 |
@@ -641,7 +641,8 @@ libof-ldconfig = ldconfig
|
|
|
b1dca6 |
CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
|
|
|
b1dca6 |
CFLAGS-cache.c += $(SYSCONF-FLAGS)
|
|
|
b1dca6 |
CFLAGS-rtld.c += $(SYSCONF-FLAGS)
|
|
|
b1dca6 |
-CFLAGS-dl-usage.c += $(SYSCONF-FLAGS)
|
|
|
b1dca6 |
+CFLAGS-dl-usage.c += $(SYSCONF-FLAGS) \
|
|
|
b1dca6 |
+ -D'RTLD="$(rtlddir)/$(rtld-installed-name)"'
|
|
|
b1dca6 |
|
|
|
b1dca6 |
cpp-srcs-left := $(all-rtld-routines:=.os)
|
|
|
b1dca6 |
lib := rtld
|
|
|
b1dca6 |
diff --git a/elf/dl-usage.c b/elf/dl-usage.c
|
|
|
b1dca6 |
index 8c24c13770500df9..1003a435bfc2b39e 100644
|
|
|
b1dca6 |
--- a/elf/dl-usage.c
|
|
|
b1dca6 |
+++ b/elf/dl-usage.c
|
|
|
b1dca6 |
@@ -76,6 +76,8 @@ setting environment variables (which would be inherited by subprocesses).\n\
|
|
|
b1dca6 |
--argv0 STRING set argv[0] to STRING before running\n\
|
|
|
b1dca6 |
--help display this help and exit\n\
|
|
|
b1dca6 |
--version output version information and exit\n\
|
|
|
b1dca6 |
+\n\
|
|
|
b1dca6 |
+This program interpreter self-identifies as: " RTLD "\n\
|
|
|
b1dca6 |
",
|
|
|
b1dca6 |
argv0);
|
|
|
b1dca6 |
_exit (EXIT_SUCCESS);
|