]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
hppa64: Fix some issues handling dynamic relocaltions
authorJohn David Anglin <danglin@gcc.gnu.org>
Tue, 4 Nov 2025 21:00:04 +0000 (16:00 -0500)
committerJohn David Anglin <danglin@gcc.gnu.org>
Tue, 4 Nov 2025 21:00:04 +0000 (16:00 -0500)
commitd05b05527b9598a5822e358061f1d59a6db1aa86
tree9e7bfbad36539842ea2631df611767c7ad3a71df
parent628d488652baa53d445e11a73f2a9559c96aac70
hppa64: Fix some issues handling dynamic relocaltions

This change fixes the allocation logic in allocate_dynrel_entries and
elf64_hppa_finalize_dynreloc.  It also fixes addend calculation for
segment based relocations.

Some applications now link successfully on HP-UX but there are still
issues with external weak symbols.  This breaks linking with libgcc.
It looks like we need support for .rela.data.rel.ro, ...

2025-11-04  John David Anglin  <danglin@gcc.gnu.org>

bfd/ChangeLog:

* elf64-hppa.c (allocate_dynrel_entries): Correct hh->want_opd
if condition.
(elf64_hppa_finalize_dynreloc): Likewise.  Use symbol address
instead of OPD address.  Include sec->output_offset in value2
calculation.
(elf64_hppa_finalize_opd): Likewise.
(elf64_hppa_finalize_dlt): Likewise.
(elf_hppa_final_link_relocate): Fix symbol address calculation.
bfd/elf64-hppa.c