]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
hppa64: Fix relocation handling for global data and a couple of thinkos
authorJohn David Anglin <danglin@gcc.gnu.org>
Wed, 8 Oct 2025 21:04:02 +0000 (17:04 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 8 Oct 2025 21:04:02 +0000 (17:04 -0400)
commitdba6c2123548b668f382bafe743471c1831104aa
tree35e3bf40fe071ad6a4b2b8d800bbaca73e783146
parent40305c9581b2b73e7f6f9a124a5e470449c623ef
hppa64: Fix relocation handling for global data and a couple of thinkos

This fixes relocation handling in situations where hh->owner and
hh->sym_indx were not initialized.

2025-10-08  John David Anglin  <danglin@gcc.gnu.org>

bfd/ChangeLog:

PR binutils/6511
* elf64-hppa.c (global_sym_index): New from ia64.
(elf64_hppa_check_relocs): Only set hh->eh.ref_regular if we
have a regular definition.
(elf64_hppa_check_relocs): Add missing NEED_DYNREL to need_entry
assignment.
(elf64_hppa_check_relocs): Stash symbol index and section
earlier.
(allocate_global_data_dlt): Initialize hh->owner and hh->sym_indx
if not initialized.
(allocate_global_data_opd): Likewise.  Remove redundant checks
for NULL hh.
(allocate_dynrel_entries): Check for discarded
hppa_info->other_rel_sec section.  Add assert rent->sec->owner
== hh->owner.
(elf64_hppa_finalize_dynreloc): Check for discarded
hppa_info->other_rel_sec section.
(elf_hppa_final_link_relocate): Return bfd_reloc_ok if we
have R_PARISC_NONE relocation.
bfd/elf64-hppa.c