[committed] hppa64: Use address of __text_seg symbol in elf64_hppa_finalize_opd
John David Anglin
dave.anglin@bell.net
Thu Oct 30 20:42:30 GMT 2025
Committed to master.
Dave
---
hppa64: Use address of __text_seg symbol in elf64_hppa_finalize_opd
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.
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index e2e5e8ea081..4c60bc00939 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -2150,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. */
@@ -2176,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. */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20251030/a394a7de/attachment.sig>
More information about the Binutils
mailing list