[PATCH] gas: Check @@@ before renaming the versioned symbol

H.J. Lu hjl.tools@gmail.com
Sun Jan 11 23:08:06 GMT 2026


On Sun, Jan 11, 2026 at 11:13 PM Zheng Bao <fishbaoz@hotmail.com> wrote:
>
> A better patch is uploaded to bugzilla. Ignore this patch.
>

The versioned symbol with the @@@ syntax is a special case. If the symbol
is not defined, 2 `@'s will be removed from the versioned_name. Otherwise,
1 `@' will be removed.  But for malformed versioned symbols may not have
@@@:

.symver foo,foo@@@version1
.symver foo,foo@version2

Check @@@ before renaming the versioned symbol.

PR gas/33745
* config/obj-elf.c (elf_frob_file_before_adjust): Check @@@ before
renaming the versioned symbol.
* testsuite/gas/symver/symver.exp: Run symver17.
* testsuite/gas/symver/symver17.l: New file.
* testsuite/gas/symver/symver17.s: Likewise.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gas-Check-before-renaming-the-versioned-symbol.patch
Type: text/x-patch
Size: 2768 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260112/a7025070/attachment.bin>


More information about the Binutils mailing list