[RFC] elf: fine-grained output LD_DEBUG log when symbol lookup error
Florian Weimer
fweimer@redhat.com
Wed Aug 17 05:56:10 GMT 2022
* Lv Ying:
> Hi, Florian.
> Sorry to reply you too late, and thanks for your reply. I took some time to reproduce this problem.
> And I resend this email again to cc libc-alpha@sourceware.org.
>
>> Do you have a reproducer that shows what you want to fix?
> Yes, here is the reproduce processing:
> I want to get shrared object library search paths in openEuler 22.03(https://ftp.belnet.be/mirror/openeuler/openEuler-22.03-LTS/):
>
>
> # export LD_DEBUG=libs
> # whoami
> 40503: find library=libc.so.6 [0]; searching
> 40503: search cache=/etc/ld.so.cache
> 40503: trying file=/usr/lib64/libc.so.6
> 40503:
> 40503:
> 40503: calling init: /lib64/ld-linux-x86-64.so.2
> 40503:
> 40503:
> 40503: calling init: /usr/lib64/libc.so.6
> 40503:
> 40503:
> 40503: initialize program: whoami
> 40503:
> 40503:
> 40503: transferring control: whoami
> 40503:
> 40503: find library=libnss_sss.so.2 [0]; searching
> 40503: search cache=/etc/ld.so.cache
> 40503: trying file=/usr/lib64/libnss_sss.so.2
> 40503:
> 40503:
> 40503: calling init: /usr/lib64/libnss_sss.so.2
> 40503:
> 40503: /usr/lib64/libnss_sss.so.2: error: symbol lookup error: undefined symbol: _nss_sss_endaliasent (fatal)
> 40503: /usr/lib64/libnss_sss.so.2: error: symbol lookup error: undefined symbol: _nss_sss_endetherent (fatal)
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.
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.
Thanks,
Florian
More information about the Libc-alpha
mailing list