From: John David Anglin Date: Thu, 30 Oct 2025 20:40:06 +0000 (-0400) Subject: hppa64: Use address of __text_seg symbol in elf64_hppa_finalize_opd X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e352790ad47b21360110b98d7d10b2db4340d58;p=thirdparty%2Fbinutils-gdb.git hppa64: Use address of __text_seg symbol in elf64_hppa_finalize_opd 2025-10-30 John David Anglin bfd/ChangeLog: * elf64-hppa.c (elf64_hppa_finalize_opd): Use address of __text_seg symbol instead of hppa_info->text_segment_base. --- diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 73320ae6de4..4c60bc00939 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -2174,6 +2174,7 @@ elf64_hppa_finalize_opd (struct elf_link_hash_entry *eh, void *data) Elf_Internal_Rela rel; bfd_byte *loc; int dynindx; + asection *sec; /* The offset of this relocation is the absolute address of the .opd entry for this symbol. */ @@ -2200,7 +2201,8 @@ elf64_hppa_finalize_opd (struct elf_link_hash_entry *eh, void *data) + eh->root.u.def.section->output_offset); /* Compute the base address of the segment with this symbol. */ - value2 = hppa_info->text_segment_base; + sec = hppa_info->text_segment->root.u.def.section; + value2 = sec->output_section->vma; /* Compute the difference between the symbol and the text segment base address. */