bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/26551] A definition referenced by an unneeded (--as-needed) shar


From: hjl.tools at gmail dot com
Subject: [Bug ld/26551] A definition referenced by an unneeded (--as-needed) shared object should be exported
Date: Tue, 01 Sep 2020 14:22:40 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26551

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Fangrui Song from comment #5)
> ld.bfd a.o --as-needed b.so
> 
> Let a.o define a function which will be called by b.so via dlopen. In this
> case, ld should export the function. This justification may look weak but I
> think it is moving toward the right direction if we consider that GNU ld
> from binutils 2.22 defaulted to --no-copy-dt-needed-entries (doing less
> shared object traversal for more proper dependency tracking and avoiding
> unneeded work).

LD creates dynamic section only if dynamic relocation is needed.
For this test, since no dynamic relocation is needed, there is no
dynamic section.  Since there is no dynamic section, there is no
dynamic symbol table.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]