aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-10-25 13:19:16 -0300
committerAndreas K. Hüttel <dilfridge@gentoo.org>2022-11-12 22:10:55 +0100
commita0607f51cf6e0884efe459004b99c6050df5e49d (patch)
tree188a333fef7ed2c8579c3af4b80b59a5d5aaf5b0
parentlinux: Fix generic struct_stat for 64 bit time (BZ# 29657) (diff)
downloadglibc-a0607f51cf6e0884efe459004b99c6050df5e49d.tar.gz
glibc-a0607f51cf6e0884efe459004b99c6050df5e49d.tar.bz2
glibc-a0607f51cf6e0884efe459004b99c6050df5e49d.zip
elf: Reinstate on DL_DEBUG_BINDINGS _dl_lookup_symbol_x
The prelink removal done by 6628c742b2c16e wrongly removed the debug support. Checked on x86_64-linux-gnu. (cherry picked from commit 891a7958a28eac6d4af1517dd2896fef5e4951d4) (cherry picked from commit a1dc0be03c9dd850b864bd7a9c03cf8e396eb7ca) Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rw-r--r--elf/dl-lookup.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 4c86dc694e..67fb2e31e2 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -854,6 +854,23 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
if (__glibc_unlikely (current_value.m->l_used == 0))
current_value.m->l_used = 1;
+ if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS))
+ {
+ const char *reference_name = undef_map->l_name;
+
+ _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
+ DSO_FILENAME (reference_name),
+ undef_map->l_ns,
+ DSO_FILENAME (current_value.m->l_name),
+ current_value.m->l_ns,
+ protected ? "protected" : "normal", undef_name);
+ if (version)
+ _dl_debug_printf_c (" [%s]\n", version->name);
+ else
+ _dl_debug_printf_c ("\n");
+ }
+
+
*ref = current_value.s;
return LOOKUP_VALUE (current_value.m);
}