hppa64 linker crash on ld-elf/pr22269 testcase
John David Anglin
dave.anglin@bell.net
Thu Dec 4 22:02:32 GMT 2025
On 2025-12-04 4:33 p.m., Alan Modra wrote:
> On Thu, Dec 04, 2025 at 04:32:27PM +0100, Jan Beulich wrote:
>> Hello,
>>
>> while looking over (many) segmentation faults spamming the kernel log and
>> resulting from broad testsuite runs, I came across this issue in
>> elf64_hppa_finalize_dynreloc(): While iterating reloc entries, the reference
>> to the undefined weak "func" is found. The code determining dynindx and
>> updating rel.r_addend, however, assumes to only ever deal with defined
>> symbols. As it's not at all clear to me how to handle undefined symbols
>> there (first and foremost where to take dynindx from), I can't really
>> propose a patch. May I ask that one of you take care of this?
>
> This is likely HJ's has_local_dynsyms, with patch posted at
> https://sourceware.org/pipermail/binutils/2025-December/146031.html
This test has been failing for some time. It currently fails with this error:
/home/dave/gnu/binutils/objdir64/ld/../gas/as-new --defsym ALIGN=3 -o tmpdir
/pr22269.o /home/dave/gnu/binutils/src/ld/testsuite/ld-elf/pr22269.s
Executing on host: sh -c {/home/dave/gnu/binutils/objdir64/ld/../gas/as-new --d
efsym ALIGN=3 -o tmpdir/pr22269.o /home/dave/gnu/binutils/src/ld/testsuite/ld
-elf/pr22269.s 2>&1} /dev/null dump.tmp (timeout = 300)
spawn [open ...]
./ld-new -z nomemory-seal -L/home/dave/gnu/binutils/src/ld/testsuite/ld-elf -
pie --no-dynamic-linker -o tmpdir/dump tmpdir/pr22269.o
Executing on host: sh -c {./ld-new -z nomemory-seal -L/home/dave/gnu/binutils/
src/ld/testsuite/ld-elf -pie --no-dynamic-linker -o tmpdir/dump tmpdir/pr22269.
o 2>&1} /dev/null dump.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir64/ld/../binutils/readelf -r -x .data.rel.ro tmpd
ir/dump > tmpdir/dump.out
Executing on host: sh -c {/home/dave/gnu/binutils/objdir64/ld/../binutils/readel
f -r -x .data.rel.ro tmpdir/dump > tmpdir/dump.out 2>dump.tmp} /dev/null (tim
eout = 300)
spawn [open ...]
regexp_diff match failure
regexp "^There are no relocations in this file.$"
line "Relocation section '.rela.dyn' at offset 0x2b0 contains 1 entry:"
regexp_diff match failure
regexp "^Hex dump of section '.data.rel.ro':$"
line " Offset Info Type Sym. Value Sym. Name
+ Addend"
regexp_diff match failure
regexp "^ 0x[a-f0-9]+ [0 ]+[ ]+.+$"
line "0000000112c9 000200000050 R_PARISC_DIR64 00000000000112d1 __data_seg
+ 63ce005f73a33c18"
extra lines in tmpdir/dump.out starting with "^Hex dump of section '.data.rel.ro
':$"
EOF from /home/dave/gnu/binutils/src/ld/testsuite/ld-elf/pr22269a.d
FAIL: PR ld/22269
I believe there are issues with pie and forcing values to zero. But the the regexp
diff is due to my change from using dot symbols to segment symbols to handle relocations.
I think ia64 has some additional code to force undefined weak values to zero.
Dave
--
John David Anglin dave.anglin@bell.net
More information about the Binutils
mailing list