public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Lv Ying <lvying.system.thoughts@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org, lvying6@huawei.com
Subject: Re: [RFC] elf: fine-grained output LD_DEBUG log when symbol lookup error
Date: Sat, 20 Aug 2022 00:23:38 +0800	[thread overview]
Message-ID: <7f5cb4b5-be4d-d9a4-1577-25fa2572803e@gmail.com> (raw)
In-Reply-To: <87pmgz5s79.fsf@oldenburg.str.redhat.com>

Hi Florian:

Thanks again for your reply, I should express clearly the reason for this modification.


> I see.  If we want to make the change, we would have to tweak
> _dl_signal_cexception, not remove the call to it.  But I'm not sure if
> this kind of change would be appropriate for "libs".  Maybe we can add a
> new LD_DEBUG variant that prints more useful information.
This patch does not remove the call to it, just call it when LD_DEBUG=symbols or LD_DEBUG=all,
because the exception message belongs to the symbol lookup process. This patch is inspired by
commit ff9f1c5f324(Fix DL_DEBUG_UNUSED to elide the VDSO and handle PLT references properly.),
As this commit msg said:

elf/dl-lookup (_dl_lookup_symbol_x): If DL_DEBUG_UNUSED, ignore undefined symbol errors.
Before this commit, the undefined symbol error will output if LD_DEBUG is set any value(except statistics).
This commit believes that when LD_DEBUG is set to DL_DEBUG_UNUSED, there is no need to report
undefined symbol errors. Similarly, LD_DEBUG environment variable may support more settings in the future.
These settings may have the same considerations as DL_DEBUG_UNUSED, therefore, based on scalability considerations,
refined output of debug info, that is, LD_DEBUG=symbols/all output these debug info.
> In my experience, ld.so trace output isn't that helpful today for
> discovering root causes of real issues, so I'd welcome concrete
> proposals for improvements.
Florian, thank you for the experience you shared. As a newbie, this trace output is very helpful for me to understand the ld.so processing.
Please consider my proposal.


Thanks again!
Lv Ying

      reply	other threads:[~2022-08-19 16:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-07 12:00 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 message]

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=7f5cb4b5-be4d-d9a4-1577-25fa2572803e@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).