[binutils-gdb] hppa64: Use address of __text_seg symbol in elf64_hppa_finalize_opd
John David Anglin
danglin@sourceware.org
Thu Oct 30 20:40:35 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2e352790ad47b21360110b98d7d10b2db4340d58
commit 2e352790ad47b21360110b98d7d10b2db4340d58
Author: John David Anglin <danglin@gcc.gnu.org>
Date: Thu Oct 30 16:40:06 2025 -0400
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:
---
bfd/elf64-hppa.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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. */
More information about the Binutils-cvs
mailing list