diff --git a/SOURCES/binutils-2.27-revert-PLT-elision.patch b/SOURCES/binutils-2.27-revert-PLT-elision.patch new file mode 100644 index 0000000..3eb828f --- /dev/null +++ b/SOURCES/binutils-2.27-revert-PLT-elision.patch @@ -0,0 +1,76 @@ +diff -rup binutils.orig/bfd/elf32-i386.c binutils-2.27/bfd/elf32-i386.c +--- binutils.orig/bfd/elf32-i386.c 2017-05-17 11:22:32.393303573 +0100 ++++ binutils-2.27/bfd/elf32-i386.c 2017-05-17 11:25:33.097138811 +0100 +@@ -2322,8 +2322,7 @@ do_size: + if (use_plt_got + && h != NULL + && h->plt.refcount > 0 +- && (((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) +- || h->got.refcount > 0) ++ && h->got.refcount > 0 + && htab->plt_got == NULL) + { + /* Create the GOT procedure linkage table. */ +@@ -2672,16 +2671,6 @@ elf_i386_allocate_dynrelocs (struct elf_ + if PLT is used. */ + eh->func_pointer_refcount = 0; + +- if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) +- { +- /* Don't use the regular PLT for DF_BIND_NOW. */ +- h->plt.offset = (bfd_vma) -1; +- +- /* Use the GOT PLT. */ +- h->got.refcount = 1; +- eh->plt_got.refcount = 1; +- } +- + use_plt_got = eh->plt_got.refcount > 0; + + /* Make sure this symbol is output as a dynamic symbol. +diff -rup binutils.orig/bfd/elf64-x86-64.c binutils-2.27/bfd/elf64-x86-64.c +--- binutils.orig/bfd/elf64-x86-64.c 2017-05-17 11:22:32.396303537 +0100 ++++ binutils-2.27/bfd/elf64-x86-64.c 2017-05-17 11:26:00.250813521 +0100 +@@ -2722,8 +2722,7 @@ do_size: + if (use_plt_got + && h != NULL + && h->plt.refcount > 0 +- && (((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) +- || h->got.refcount > 0) ++ && h->got.refcount > 0 + && htab->plt_got == NULL) + { + /* Create the GOT procedure linkage table. */ +@@ -3094,16 +3093,6 @@ elf_x86_64_allocate_dynrelocs (struct el + if PLT is used. */ + eh->func_pointer_refcount = 0; + +- if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) +- { +- /* Don't use the regular PLT for DF_BIND_NOW. */ +- h->plt.offset = (bfd_vma) -1; +- +- /* Use the GOT PLT. */ +- h->got.refcount = 1; +- eh->plt_got.refcount = 1; +- } +- + use_plt_got = eh->plt_got.refcount > 0; + + /* Make sure this symbol is output as a dynamic symbol. +diff -rup binutils.orig/ld/testsuite/ld-i386/pr17689now.rd binutils-2.27/ld/testsuite/ld-i386/pr17689now.rd +--- binutils.orig/ld/testsuite/ld-i386/pr17689now.rd 2017-05-17 11:22:32.677300171 +0100 ++++ binutils-2.27/ld/testsuite/ld-i386/pr17689now.rd 2017-05-17 11:39:36.097021963 +0100 +@@ -1,4 +1,3 @@ +-#failif + #... + [0-9a-f ]+R_386_JUMP_SLOT +0+.* + #... +diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr17689now.rd binutils-2.27/ld/testsuite/ld-x86-64/pr17689now.rd +--- binutils.orig/ld/testsuite/ld-x86-64/pr17689now.rd 2017-05-17 11:22:32.734299489 +0100 ++++ binutils-2.27/ld/testsuite/ld-x86-64/pr17689now.rd 2017-05-17 11:39:53.071818174 +0100 +@@ -1,4 +1,3 @@ +-#failif + #... + [0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +.* + #... diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index e9d3563..10c4c89 100644 --- a/SPECS/binutils.spec +++ b/SPECS/binutils.spec @@ -30,7 +30,7 @@ Summary: A GNU collection of binary utilities Name: %{?scl_prefix}%{?cross}binutils%{?_with_debug:-debug} Version: 2.27 -Release: 10%{?dist} +Release: 12%{?dist}.1 License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -72,6 +72,8 @@ Patch17: binutils-2.27-monotonic-section-offsets.patch Patch18: binutils-2.27-aarch64-relro-default.patch # Add support for the Power9 architecture Patch19: binutils-2.27-power9.patch +# Revert H.J.'s patch to elide PLT entries. +Patch20: binutils-2.27-revert-PLT-elision.patch Provides: bundled(libiberty) @@ -198,11 +200,12 @@ using libelf instead of BFD. %patch12 -p1 -b .kernel-lto~ %patch13 -p1 -b .provide-hash~ %patch14 -p1 -b .manpage~ -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 # We cannot run autotools as there is an exact requirement of autoconf-2.59. @@ -538,6 +541,17 @@ exit 0 %endif # %{isnative} %changelog +* Mon May 22 2017 Nick Clifton 2.27-12.1 +- Add .1 to release value for z-stream build. + (#1452111) + +* Thu May 18 2017 Nick Clifton 2.27-12 +- Revert H.J.Lu's PLT elision patch. + (#1452111) + +* Thu Jan 12 2017 Nick Clifton 2.27-11 +- Version bump to allow rebuild for DTS 6.1 + * Wed Sep 28 2016 Nick Clifton 2.27-10 - Use correct default sysroot for native targets. - Add Power9 ISA 3.0 support.