Fix seg-fault in AArch64 linker when building u-boot.

Resolves: RHEL-78350
This commit is contained in:
Nick Clifton 2025-02-07 13:22:46 +00:00
parent 7e9bc04f81
commit bd2698d371
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,12 @@
--- binutils.orig/bfd/elfnn-aarch64.c 2025-02-07 12:48:33.944978470 +0000
+++ binutils-2.35.2/bfd/elfnn-aarch64.c 2025-02-07 12:48:43.791002138 +0000
@@ -9515,7 +9515,8 @@ elfNN_aarch64_init_small_plt0_entry (bfd
/* PR 26312: Explicitly set the sh_entsize to 0 so that
consumers do not think that the section contains fixed
sized objects. */
- elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = 0;
+ if (elf_section_data (htab->root.splt->output_section) != NULL)
+ elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = 0;
plt_got_2nd_ent = (htab->root.sgotplt->output_section->vma
+ htab->root.sgotplt->output_offset

View File

@ -2,7 +2,7 @@
Summary: A GNU collection of binary utilities
Name: binutils%{?_with_debug:-debug}
Version: 2.35.2
Release: 62%{?dist}
Release: 63%{?dist}
License: GPLv3+
URL: https://sourceware.org/binutils
@ -506,6 +506,10 @@ Patch90: binutils-s390-arch15-gas-tests-fixes.patch
# Lifetime: Fixed in 2.44
Patch91: binutils-linker-diagnostic-message.patch
# Purpose: Fixes an illegal memory access by the AArch64 linker when constructing the small PLT
# Lifetime: Fixed in 2.45
Patch92: binutils-aarch64-small-plt0.patch
#----------------------------------------------------------------------------
Provides: bundled(libiberty)
@ -1365,6 +1369,9 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Fri Feb 07 2025 Nick Clifton <nickc@redhat.com> - 2.35.2-63
- Fix seg-fault in AArch64 linker when building u-boot. (RHEL-78350)
* Thu Jan 30 2025 Nick Clifton <nickc@redhat.com> - 2.35.2-62
- Retire: binutils-rhivos-segment-gap.patch. (RHEL-60807)