diff --git a/SOURCES/binutils-x86-lea-addressing.patch b/SOURCES/binutils-x86-lea-addressing.patch new file mode 100644 index 0000000..6380545 --- /dev/null +++ b/SOURCES/binutils-x86-lea-addressing.patch @@ -0,0 +1,24 @@ +--- binutils.orig/bfd/elf32-i386.c 2018-05-02 15:59:44.716210095 +0100 ++++ binutils-2.27/bfd/elf32-i386.c 2018-05-02 16:02:12.714435574 +0100 +@@ -3982,7 +3982,9 @@ elf_i386_relocate_section (bfd *output_b + - gotplt->output_section->vma + - gotplt->output_offset); + +- if ((*(contents + rel->r_offset - 1) & 0xc7) == 0x5) ++ if (rel->r_offset > 1 ++ && (*(contents + rel->r_offset - 1) & 0xc7) == 0x5 ++ && *(contents + rel->r_offset - 2) != 0x8d) + { + if (bfd_link_pic (info)) + goto disallow_got32; +@@ -4252,7 +4254,9 @@ r_386_got32: + + relocation = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off); +- if ((*(contents + rel->r_offset - 1) & 0xc7) == 0x5) ++ if (rel->r_offset > 1 ++ && (*(contents + rel->r_offset - 1) & 0xc7) == 0x5 ++ && *(contents + rel->r_offset - 2) != 0x8d) + { + if (bfd_link_pic (info)) + { diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index 693e829..9dc20df 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: 27.base%{?dist} +Release: 28.base%{?dist}.1 License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -283,6 +283,10 @@ Patch40: binutils-2.27-power9.3.patch # Lifetime: Fixed in 2.30. Patch41: binutils-2.27-ppc64-discarded-plt-sections.patch +# Purpose: Allow "lea foo@GOT, %reg" in PIC mode on the x86. +# Lifetime: Fixed in 2.28 +Patch42: binutils-x86-lea-addressing.patch + # Purpose: A *temporary* patch to disable the generation of # R_X86_64_GOTPCRELX and R_X86_64_REX_GETPCRELX relocations by the # x86_64 assembler and the generations of the R_386_GOT32X @@ -462,6 +466,7 @@ using libelf instead of BFD. %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 # TEMPORARY patches. %patch998 -p1 @@ -868,6 +873,16 @@ exit 0 #--------------------------------------------------------------------------------- %changelog +* Tue May 29 2018 Nick Clifton 2.27-28.base.1 +- Fix the N-V-R for z-stream release. + +* Fri May 25 2018 Marek Polacek 2.27-28.base.0.0.hotfix.1.bz1582602 +- Hotfix build. + +* Fri May 25 2018 Marek Polacek 2.27-28.base +- Allow "lea foo@GOT, %reg" in PIC mode on the x86. + (#1582602) + * Thu Jan 11 2018 Nick Clifton 2.27-27.base - Do enable relro by default for the PowerPC64 architecture. (#1523946)