]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
hppa64: Use address of __text_seg symbol in elf64_hppa_finalize_opd
authorJohn David Anglin <danglin@gcc.gnu.org>
Thu, 30 Oct 2025 20:40:06 +0000 (16:40 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Thu, 30 Oct 2025 20:40:06 +0000 (16:40 -0400)
2025-10-30  John David Anglin  <danglin@gcc.gnu.org>

bfd/ChangeLog:

* elf64-hppa.c (elf64_hppa_finalize_opd): Use address of
__text_seg symbol instead of hppa_info->text_segment_base.

bfd/elf64-hppa.c

index 73320ae6de4f00e9571c707de336e1e9ac3cd399..4c60bc009394eb34071980e03f047e92c7e7171d 100644 (file)
@@ -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.  */