[PATCH] ld: Use 0x10000 as absolute symbol value in PR ld/25754 tests

Jan Beulich jbeulich@suse.com
Thu Jun 18 12:19:46 GMT 2026


On 18.06.2026 14:05, H.J. Lu wrote:
> PR ld/25754 tests verify that relocations against absolute symbol are
> properly handled, using 42 as the absolute symbol value.  But GCC 17
> treats 42 as the impossible symbol address, which is the absolute symbol
> value and optimize out the symbol address check:
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125869
> 
> Use 0x10000, instead of 42, as absolute symbol value to work with GCC 17.
> 
> PR ld/34298
> * testsuite/ld-elf/pr25754-1a.c (main): Check against 0x10000
> instead of 42.
> * testsuite/ld-elf/pr25754-1b.s (bar): Replace 42 with 0x10000.

The binutils bugzilla entry says it's a gcc bug. The gcc bugzilla entry
says it's a flawed testcase in binutils. Which one is it? Depending on
that the description here needs updating. Furthermore you name just 42
here, when in the gcc bugzilla entry you said values up to 0x800 are a
problem.

Jan


More information about the Binutils mailing list