* [PATCH] elf: Reinstate on DL_DEBUG_BINDINGS _dl_lookup_symbol_x
@ 2022-10-25 16:22 Adhemerval Zanella
2022-10-26 12:11 ` Andreas Schwab
0 siblings, 1 reply; 2+ messages in thread
From: Adhemerval Zanella @ 2022-10-25 16:22 UTC (permalink / raw)
To: libc-alpha, Andreas Schwab; +Cc: Siddhesh Poyarekar
The prelink removal done by 6628c742b2c16e wrongly removed the debug
support.
Checked on x86_64-linux-gnu.
---
elf/dl-lookup.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
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);
}
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] elf: Reinstate on DL_DEBUG_BINDINGS _dl_lookup_symbol_x
2022-10-25 16:22 [PATCH] elf: Reinstate on DL_DEBUG_BINDINGS _dl_lookup_symbol_x Adhemerval Zanella
@ 2022-10-26 12:11 ` Andreas Schwab
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2022-10-26 12:11 UTC (permalink / raw)
To: Adhemerval Zanella via Libc-alpha; +Cc: Adhemerval Zanella, Siddhesh Poyarekar
On Okt 25 2022, Adhemerval Zanella via Libc-alpha wrote:
> The prelink removal done by 6628c742b2c16e wrongly removed the debug
> support.
Ok.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-26 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 16:22 [PATCH] elf: Reinstate on DL_DEBUG_BINDINGS _dl_lookup_symbol_x Adhemerval Zanella
2022-10-26 12:11 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).