[PATCH] ld: testsuite: Skip pr33577 tests with GNU extensions on Solaris [PR33577]

Alan Modra amodra@gmail.com
Fri Jan 23 23:46:33 GMT 2026


On Fri, Jan 23, 2026 at 09:14:14PM +0100, Rainer Orth wrote:
> Several of the ld-elfvers pr33577 tests FAIL on Solaris, for either or
> both of two reasons:
> 
> * Tests using ld --hash-style=gnu cannot work on Solaris:
>   .gnu.hash/SHT_GNU_HASH sections are a GNU extension not supported by
>   Solaris ld.so.1
> 
> * Similarly, binding different implementations of the same symbol to
>   different symbol versions is a GNU extension that wasn't in the
>   original Solaris specification of symbol versioning.  ld.so.1 doesn't
>   support them and never will.
> 
> Therefore the tests that employ those extensions are guarded with
> supports_gnu_osabi.
> 
> Tested on sparc{,v9}-sun-solaris2.11, sparc{,64}-unknown-linux-gnu,
> {i386,amd64}-pc-solaris2.11, and {x86_64,i686}-pc-linux-gnu.
> 
> Ok for trunk?

OK.

> I firmly believe that any object that uses either extension should be
> marked as either the native OSABI (e.g. ELFOSABI_FREEBSD) or
> ELFOSABI_GNU so they fail to load rather than causing hard-to-debug
> runtime failures.

Yes, fair enough.

-- 
Alan Modra


More information about the Binutils mailing list