[PATCH v2] elf: Don't set its DT_VERSYM entry for unversioned symbol

Jan Beulich jbeulich@suse.com
Thu Oct 30 14:27:44 GMT 2025


On 29.10.2025 03:09, H.J. Lu wrote:
> On Wed, Oct 29, 2025 at 9:54 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> Undefined symbol without version shouldn't have the BASE version in its
>> DT_VERSYM entry.  Instead its DT_VERSYM entry should be all zero to
>> indicate that the symbol doesn't have a version.
>>
>> bfd/
>>
>> PR ld/33577
>> * elflink.c (elf_link_output_extsym): Don't set its DT_VERSYM
>> entry for unversioned symbol.
>>
>> ld/
>>
>> PR ld/33577
>> * testsuite/ld-elf/undefined.d: New file.
>> * testsuite/ld-elf/undefined.map: Likewise.
>> * testsuite/ld-elf/undefined.s: Likewise.
>>
>> OK for master?
> 
> Here is the v2 patch to only check undefined symbols.

Just one question: Wouldn't the new testcase be a better fit in ld-elfvers/?
If you agree, okay with it moved there.

Jan


More information about the Binutils mailing list