From 1164dc3bf85a7973bee468560b8b4a752fac6d33 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Jul 12 2018 15:33:35 +0000 Subject: Stop gold from complaining about annobin note relocs against symbols in sections which have been discarded. Resolves: #1600431 --- diff --git a/binutils-gold-ignore-discarded-note-relocs.patch b/binutils-gold-ignore-discarded-note-relocs.patch new file mode 100644 index 0000000..9f7e435 --- /dev/null +++ b/binutils-gold-ignore-discarded-note-relocs.patch @@ -0,0 +1,10 @@ +--- binutils.orig/gold/target-reloc.h 2018-07-12 11:37:24.894494658 +0100 ++++ binutils-2.30.90/gold/target-reloc.h 2018-07-12 15:38:50.049083904 +0100 +@@ -136,6 +136,7 @@ class Default_comdat_behavior + if (Layout::is_debug_info_section(name)) + return CB_PRETEND; + if (strcmp(name, ".eh_frame") == 0 ++ || strcmp(name, ".gnu.build.attributes") == 0 // FIXME: We should really be checking the section type for ST_NOTE... + || strcmp(name, ".gcc_except_table") == 0) + return CB_IGNORE; + return CB_ERROR; diff --git a/binutils.spec b/binutils.spec index 7d735a3..928ac02 100644 --- a/binutils.spec +++ b/binutils.spec @@ -69,7 +69,7 @@ Summary: A GNU collection of binary utilities Name: %{?cross}binutils%{?_with_debug:-debug} Version: 2.30.90 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -160,6 +160,11 @@ Patch10: binutils-fix-testsuite-failures.patch # Lifetime: Fixed in 2.32 (maybe) Patch11: binutils-do-not-provide-shared-section-symbols.patch +# Purpose: Stop gold from complaining about relocs in the .gnu.build.attribute +# section that reference symbols in discarded sections. +# Lifetime: Fixed in 2.32 (maybe) +Patch12: binutils-gold-ignore-discarded-note-relocs.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -288,13 +293,14 @@ using libelf instead of BFD. %patch02 -p1 %patch03 -p1 %patch04 -p1 -# %patch05 -p1 +#% patch05 -p1 %patch06 -p1 %patch07 -p1 %patch08 -p1 %patch09 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 # We cannot run autotools as there is an exact requirement of autoconf-2.59. @@ -702,6 +708,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Thu Jul 12 2018 Nick Clifton 2.30.90-3 +- Stop gold from complaining about annobin note relocs against symbols in sections which have been discarded. (#1600431) + * Tue Jul 10 2018 Nick Clifton 2.30.90-2 - Revert fix for PR 23161 which was placing unversioned section symbols (_edata, _end, __bss_start) into shared libraries. (#1599521)