diff --git a/SOURCES/binutils-multiple-relocs-for-same-section.patch b/SOURCES/binutils-multiple-relocs-for-same-section.patch new file mode 100644 index 0000000..165c743 --- /dev/null +++ b/SOURCES/binutils-multiple-relocs-for-same-section.patch @@ -0,0 +1,23 @@ +--- binutils.orig/bfd/elf.c 2019-09-10 10:57:33.391081672 +0100 ++++ binutils-2.27/bfd/elf.c 2019-09-10 10:59:55.355010766 +0100 +@@ -2324,9 +2324,18 @@ bfd_section_from_shdr (bfd *abfd, unsign + else + p_hdr = &esdt->rel.hdr; + +- /* PR 17512: file: 0b4f81b7. */ ++ /* PR 17512: file: 0b4f81b7. ++ Also see PR 24456, for a file which deliberately has two reloc ++ sections. */ + if (*p_hdr != NULL) +- goto fail; ++ { ++ _bfd_error_handler ++ /* xgettext:c-format */ ++ (_("%B: warning: multiple relocation sections for section %A \ ++found - ignoring all but the first"), ++ abfd, target_sect); ++ goto success; ++ } + hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, sizeof (*hdr2)); + if (hdr2 == NULL) + goto fail; diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index 3fa8574..49f7960 100644 --- a/SPECS/binutils.spec +++ b/SPECS/binutils.spec @@ -54,7 +54,7 @@ Version: 2.27 # Note: The Release string *must* be different from that used by any of the # devtoolset binutils associated with this release. That is why ".base" # has been appended here. See BZ 1337617 for more details. -Release: 41.base%{?dist} +Release: 41.base%{?dist}.1 License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -363,6 +363,12 @@ Patch59: binutils-x86_64-disable-PLT-elision.patch # Lifetime: Fixed in 2.32 Patch60: binutils-CVE-2018-1000876.patch +# Purpose: Stop the BFD library from complaining about files with multiple +# relocations against the same section. Allows examination of +# special kernel modules. +# Lifetime: Fixed in 2.33 +Patch61: binutils-multiple-relocs-for-same-section.patch + # Purpose: A *temporary* patch to disable the generation of # R_X86_64_GOTPCRELX and R_X86_64_REX_GETPCRELX relocations by the @@ -562,6 +568,7 @@ using libelf instead of BFD. %patch58 -p1 %patch59 -p1 %patch60 -p1 +%patch61 -p1 # TEMPORARY patches. %patch998 -p1 @@ -973,6 +980,9 @@ exit 0 #--------------------------------------------------------------------------------- %changelog +* Thu Sep 26 2019 Nick Clifton 2.27-41.base.1 +- Stop the BFD library from complaining about multiple reloc sections for the same code section. (#1755779) + * Mon Apr 15 2019 Nick Clifton 2.27-41.base - Fix up some linker tests that fail because of the R_x86_64_GOTPCRELX patch. (#1699745)