From: Lv Ying <lvying.system.thoughts@gmail.com>
To: libc-alpha@sourceware.org, fweimer@redhat.com
Cc: lvying6@huawei.com, Lv Ying <lvying.system.thoughts@gmail.com>
Subject: [RFC] elf: fine-grained output LD_DEBUG log when symbol lookup error
Date: Sun, 7 Aug 2022 05:00:03 -0700 [thread overview]
Message-ID: <20220807120003.313131-1-lvying.system.thoughts@gmail.com> (raw)
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
next reply other threads:[~2022-08-07 12:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-07 12:00 Lv Ying [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220807120003.313131-1-lvying.system.thoughts@gmail.com \
--to=lvying.system.thoughts@gmail.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=lvying6@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).