public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [RFC] elf: fine-grained output LD_DEBUG log when symbol lookup error
@ 2022-08-07 12:00 Lv Ying
  2022-08-08 13:19 ` Florian Weimer
  0 siblings, 1 reply; 5+ messages in thread
From: Lv Ying @ 2022-08-07 12:00 UTC (permalink / raw)
  To: libc-alpha, fweimer; +Cc: lvying6, Lv Ying

When LD_DEBUG environment variable is set except "unused" value, symbol lookup error
in _dl_lookup_symbol_x will output unrelated debugging information which mess up the
"files" "libs" "reloc" log.

"undefined symbol" debugging information should only output when LD_DEBUG="symbols|all".
---
 elf/dl-lookup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 4c86dc694e..6085c6c90c 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -781,7 +781,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
   if (__glibc_unlikely (current_value.s == NULL))
     {
       if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
-	  && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
+	  && (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS))
 	{
 	  /* We could find no value for a strong reference.  */
 	  const char *reference_name = undef_map ? undef_map->l_name : "";
-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-19 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 12:00 [RFC] elf: fine-grained output LD_DEBUG log when symbol lookup error Lv Ying
2022-08-08 13:19 ` Florian Weimer
2022-08-17  3:51   ` Lv Ying
2022-08-17  5:56     ` Florian Weimer
2022-08-19 16:23       ` Lv Ying

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).