[PATCH v3] elf: Don't set its DT_VERSYM entry for unversioned symbol
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Wed Nov 5 06:55:01 GMT 2025
Hi Alan,
> On Fri, Oct 31, 2025 at 07:21:37AM +0800, H.J. Lu wrote:
>> Here is the v3 patch with updated tests in ld-elfvers. I also updated
>> elf_link_output_extsym to handle defined symbol without version with
>> a test.
>>
>> OK for master?
I wonder if we should add the testcase attached to the PR, adjusted to
work on all targets?
ld: Add testcase for PR ld/PR33577
This patch adds a testcase for the already fixed PR ld/PR33577. Before
the patch, show_undef_weak would be incorrectly bound to the Base
version of the shared object:
0000000000000000 w D *UND* 0000000000000000 Base show_undef_weak
while now it's not anymore:
0000000000000000 w D *UND* 0000000000000000 show_undef_weak
Tested on sparc{,v9}-sun-solaris2.11, {amd64,i386}-pc-solaris2.11, and
{x86_64,i686}-pc-linux-gnu.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2025-10-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
ld:
PR ld/33577
* testsuite/ld-elfvers/vers33.c: New test.
* testsuite/ld-elfvers/vers33.dsym: Likewise.
* testsuite/ld-elfvers/vers33.map: Likewise.
* testsuite/ld-elfvers/vers33.ver: Likewise.
* testsuite/ld-elfvers/vers.exp: Run it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld-testsuite-no-undef-weak-basevers.patch
Type: text/x-patch
Size: 1840 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20251105/4c00fed8/attachment-0001.bin>
More information about the Binutils
mailing list