hppa64 linker crash on ld-elf/pr22269 testcase

Alan Modra amodra@gmail.com
Fri Dec 5 11:51:12 GMT 2025
On Fri, Dec 05, 2025 at 08:03:30AM +0100, Jan Beulich wrote:
> On 04.12.2025 22:33, 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
> 
> Hmm, I may give it a try, but I don't think that's it. First and foremost
> because I'm certain the problem I'm observing pre-dates the change that
> the patch above is a follow-on to. In Dave's reply he also says this is
> failing for him with some error; as said, for me the linker simply crashes.

Yes, I should have looked at my hppa64-linux test results before
commenting.  The segfault at elf64-hppa.c:2367 is due to the code
assuming a symbol with dynindx -1 must be defined or defweak when it
is actually undefweak.

-- 
Alan Modra


More information about the Binutils mailing list