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

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Fri Jan 23 20:14:14 GMT 2026


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?

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.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2026-01-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	ld:
	PR ld/33577
	* testsuite/ld-elfvers/vers.exp (base_symbol_test): Only run
	pr33577a with libpr33577-versioned.so test on ELFOSABI_GNU
	systems.
	Likewise for run base_symbol_tests with --hash-style=gnu.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sol2-ld-testsuite-pr33577-gnu_osabi.patch
Type: text/x-patch
Size: 1537 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260123/4666b08a/attachment.bin>


More information about the Binutils mailing list