[binutils-gdb/binutils-2_47-branch] x86: Restore generic copy of special section fields
Jan Beulich
jbeulich@sourceware.org
Mon Nov 16 07:38:04 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8b69d26f66f17be7651c617d99e60768d489ef35
commit 8b69d26f66f17be7651c617d99e60768d489ef35
Author: Antoine Damhet <adamhet@scaleway.com>
Date: Mon Nov 16 08:33:51 2026 +0100
x86: Restore generic copy of special section fields
Commit f5c3ce3687f7 ("x86: Add
_bfd_elf_x86_copy_special_section_fields") short-circuited the generic
handling for non-Solaris binaries. Restore the generic handling for
these inputs to avoid 'SHT_SECONDARY_RELOC' with zeroed
'sh_link/sh_info'.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34970
Signed-off-by: Antoine Damhet <adamhet@scaleway.com>
Diff:
---
bfd/elfxx-x86.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 0f79ef58f02..b531a261fd4 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -4978,7 +4978,10 @@ _bfd_elf_x86_copy_special_section_fields
{
/* Return false for Solaris binary to properly set the sh_info and
sh_link fields of Solaris specific sections. */
- return elf_elfheader (ibfd)->e_ident[EI_OSABI] != ELFOSABI_SOLARIS;
+ if (elf_elfheader (ibfd)->e_ident[EI_OSABI] == ELFOSABI_SOLARIS)
+ return false;
+
+ return _bfd_elf_copy_special_section_fields (ibfd, obfd, isection, osection);
}
void
More information about the Binutils-cvs
mailing list