[v2 PATCH] elf: Verify that there is only one default version

H.J. Lu hjl.tools@gmail.com
Thu Aug 27 00:12:55 GMT 2026


On Wed, Aug 26, 2026 at 11:35 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> When assigning the symbol version, verify that there is only one default
> version.
>

Here is the v2 patch to provide info of where multiple default versions
are defined:

ld -shared -o pr34550.so pr34550a.o pr34550b.o --version-script pr34550.t
/usr/local/bin/ld: pr34550.so: multiple default versions of `fmod':
`GLIBC_2.0' in pr34550a.o and `GLIBC_2.43' in pr34550b.o.
/usr/local/bin/ld: failed to set dynamic section sizes: bad value

-- 
H.J.
---
When assigning the symbol version, verify that there is only one default
version.

bfd/

PR ld/34550
* elflink.c (_bfd_elf_link_assign_sym_version): Verify that there
is only one default version.

ld/

PR ld/34550
* testsuite/ld-elf/pr34550.d: New test.
* testsuite/ld-elf/pr34550.t: Likewise.
* testsuite/ld-elf/pr34550a.s: Likewise.
* testsuite/ld-elf/pr34550b.s: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-elf-Verify-that-there-is-only-one-default-version.patch
Type: text/x-patch
Size: 4773 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260827/5fa20d17/attachment.bin>


More information about the Binutils mailing list