From 39727409f1e1cc674c5aac641bb565aca5de0ce7 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 18 Feb 2021 13:40:05 +0000 Subject: [PATCH] Fix merging ppc64le notes. (#1928936) --- binutils-ppc64le-note-merge.patch | 14 ++++++++++++++ binutils.spec | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 binutils-ppc64le-note-merge.patch diff --git a/binutils-ppc64le-note-merge.patch b/binutils-ppc64le-note-merge.patch new file mode 100644 index 0000000..3619c55 --- /dev/null +++ b/binutils-ppc64le-note-merge.patch @@ -0,0 +1,14 @@ +--- binutils.orig/binutils/objcopy.c 2021-02-18 11:35:48.062479490 +0000 ++++ binutils-2.30/binutils/objcopy.c 2021-02-18 11:36:52.207071148 +0000 +@@ -2224,6 +2224,11 @@ merge_gnu_build_notes (bfd * ab + goto done; + } + ++ if (start > end) ++ /* This can happen with PPC64LE binaries where empty notes are ++ encoded as start = end + 4. */ ++ start = end; ++ + if (is_open_note (pnote)) + { + if (start) diff --git a/binutils.spec b/binutils.spec index 1ed0c72..833a6f2 100644 --- a/binutils.spec +++ b/binutils.spec @@ -39,7 +39,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?name_cross}%{?_with_debug:-debug} Version: 2.35.1 -Release: 34%{?dist} +Release: 35%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -337,6 +337,10 @@ Patch35: binutils-CVE-2021-20197.patch # Lifetime: Fixed in 2.37 Patch36: binutils-ld-DWARF-5-sections.patch +# Purpose: Fix merging empty ppc64le notes. +# Lifetime: Fixed in 2.37 +Patch37: binutils-ppc64le-note-merge.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -922,6 +926,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Thu Feb 18 2021 Nick Clifton - 2.35.1-35 +- Fix merging ppc64le notes. (#1928936) + * Mon Feb 08 2021 Nick Clifton - 2.35.1-34 - Extend vulnerability fix again. (#1925779)