[committed] hppa64: Use address of __text_seg symbol insted of hppa_info->text_segment_base
John David Anglin
dave.anglin@bell.net
Thu Oct 30 20:33:27 GMT 2025
Committed to master.
Dave
---
hppa64: Use address of __text_seg symbol insted of hppa_info->text_segment_base
2025-10-30 John David Anglin <danglin@gcc.gnu.org>
bfd/ChangeLog:
* elf64-hppa.c (elf_hppa_final_link_relocate): Use address of
__text_seg symbol insted of hppa_info->text_segment_base.
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index e2e5e8ea081..73320ae6de4 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -3721,6 +3745,7 @@ elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
Elf_Internal_Rela rela;
bfd_byte *loc, *locend;
int dynindx;
+ asection *sec;
/* The offset of this relocation is the absolute address
of the .opd entry for this symbol. */
@@ -3729,7 +3754,8 @@ elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
/* Compute the difference between the symbol address
and the test segment base address. */
- value = relocation + addend - hppa_info->text_segment_base;
+ sec = hppa_info->text_segment->root.u.def.section;
+ value = (relocation + addend - sec->output_section->vma);
/* The result becomes the addend of the relocation. */
rela.r_addend = value;
-------------- 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/0bfee9b2/attachment.sig>
More information about the Binutils
mailing list