From b0bbc38aef62ca5aa5875d9eb31cfd075f15485a Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 6 Nov 2019 14:00:17 +0000 Subject: [PATCH] Strip: Do not merge notes unless explicitly requested to do so. --- binutils-improved-note-merging.patch | 20 ++++++++++++++++++++ binutils.spec | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/binutils-improved-note-merging.patch b/binutils-improved-note-merging.patch index b830728..4c6efad 100644 --- a/binutils-improved-note-merging.patch +++ b/binutils-improved-note-merging.patch @@ -1874,3 +1874,23 @@ diff -rupN binutils.orig/binutils/testsuite/binutils-all/objcopy.exp binutils-2. } free (pnotes); +--- binutils.orig/binutils/objcopy.c 2019-11-06 13:37:33.952297613 +0000 ++++ binutils-2.33.1/binutils/objcopy.c 2019-11-06 13:38:23.751933043 +0000 +@@ -4660,7 +4660,7 @@ strip_main (int argc, char *argv[]) + strip_usage (stderr, 1); + } + } +- ++#if 0 + /* If the user has not expressly chosen to merge/not-merge ELF notes + then enable the merging unless we are stripping debug or dwo info. */ + if (! merge_notes_set +@@ -4670,7 +4670,7 @@ strip_main (int argc, char *argv[]) + || strip_symbols == STRIP_NONDEBUG + || strip_symbols == STRIP_NONDWO)) + merge_notes = TRUE; +- ++#endif + if (formats_info) + { + display_info (); diff --git a/binutils.spec b/binutils.spec index 9959ec8..d623e7a 100644 --- a/binutils.spec +++ b/binutils.spec @@ -2,7 +2,7 @@ Summary: A GNU collection of binary utilities Name: %{?cross}binutils%{?_with_debug:-debug} Version: 2.33.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -765,6 +765,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Wed Nov 06 2019 Nick Clifton - 2.33-5 +- Strip: Do not merge notes unless explicitly requested to do so. + * Tue Nov 05 2019 Nick Clifton - 2.33-4 - Objcopy: Do not generate a failure exit status if note merging fails. (#1767937)