From 2e352790ad47b21360110b98d7d10b2db4340d58 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Thu, 30 Oct 2025 16:40:06 -0400 Subject: [PATCH] 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. --- 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. */ -- 2.47.3