meaning of supports_gnu_unique

Alan Modra amodra@gmail.com
Thu Mar 26 23:27:58 GMT 2026


On Thu, Mar 26, 2026 at 03:35:55PM +0100, Jan Beulich wrote:
> may I ask what the purpose is of this predicate used by the testsuite?
> By its name I would in particular expect it to cover the
> %gnu_unique_object symbol type (supported by the comment there), but as
> demonstrated by ld-unique/unique failing for arm-unknown-linux-gnu there
> must be something I'm missing.

Hi Jan,
I don't see any fails on my cross builds of arm-linux-gnueabi..

Maciej was the original author of that function.  I extracted out
supports_gnu_osabi, prior to which the comment for supports_gnu_unique
said:

# True if the ELF target supports STB_GNU_UNIQUE with the ELF header's
# OSABI field set to ELFOSABI_GNU.
#
# This generally depends on the target OS only, however there are a
# number of exceptions for bare metal targets as follows.  The MSP430
# and Visium targets set OSABI to ELFOSABI_STANDALONE and cannot
# support STB_GNU_UNIQUE.  Likewise non-EABI ARM targets set OSABI to
# ELFOSABI_ARM, and TI C6X targets to ELFOSABI_C6000_*.  Finally
# rather than `bfd_elf_final_link' a number of targets use
# `_bfd_generic_final_link', which does not support STB_GNU_UNIQUE
# symbol binding causing assertion failures.
#


-- 
Alan Modra


More information about the Binutils mailing list