From 975f892d8977f9e78ffdd014ca84f792ad069c2f Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 15 Feb 2017 17:37:09 +0000 Subject: [PATCH] Fix running the ARM port of the linker on BINARY objects. Resolves: #1422577 --- binutils-2.27-arm-binary-objects.patch | 12 ++++++++++++ binutils.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 binutils-2.27-arm-binary-objects.patch diff --git a/binutils-2.27-arm-binary-objects.patch b/binutils-2.27-arm-binary-objects.patch new file mode 100644 index 0000000..38f4e31 --- /dev/null +++ b/binutils-2.27-arm-binary-objects.patch @@ -0,0 +1,12 @@ +diff -rup binutils-2.27.orig/bfd/elf32-arm.c binutils-2.27/bfd/elf32-arm.c +--- binutils-2.27.orig/bfd/elf32-arm.c 2017-02-15 17:25:01.331124382 +0000 ++++ binutils-2.27/bfd/elf32-arm.c 2017-02-15 17:25:32.044613743 +0000 +@@ -18172,7 +18172,7 @@ elf32_arm_count_additional_relocs (asect + { + struct _arm_elf_section_data *arm_data; + arm_data = get_arm_elf_section_data (sec); +- return arm_data->additional_reloc_count; ++ return arm_data == NULL ? 0 : arm_data->additional_reloc_count; + } + + /* Called to set the sh_flags, sh_link and sh_info fields of OSECTION which diff --git a/binutils.spec b/binutils.spec index 03a963f..84b75c4 100644 --- a/binutils.spec +++ b/binutils.spec @@ -43,7 +43,7 @@ Summary: A GNU collection of binary utilities Name: %{?cross}binutils%{?_with_debug:-debug} Version: 2.27 -Release: 17%{?dist} +Release: 18%{?dist} License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -96,6 +96,8 @@ Patch22: binutils-2.27-objdump-improvements.2.patch Patch23: binutils-2.27-filename-in-error-messages.patch # Fix a couple of buffer overflows when printing messages in translated strings. Patch24: binutils-2.27-ld-buffer-overflow.patch +# Fix running ARM linker on BINARY objects. +Patch25: binutils-2.27-arm-binary-objects.patch Provides: bundled(libiberty) @@ -245,6 +247,7 @@ using libelf instead of BFD. %patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch25 -p1 # We cannot run autotools as there is an exact requirement of autoconf-2.59. @@ -611,6 +614,10 @@ exit 0 %endif # %{isnative} %changelog +* Wed Feb 15 2017 Nick Clifton 2.27-18 +- Fix running the ARM port of the linker on BINARY objects. + (#1422577) + * Fri Feb 10 2017 Fedora Release Engineering - 2.27-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild