Blame SOURCES/binutils-2.27-revert-PLT-elision.patch

be6651
diff -rup binutils.orig/bfd/elf32-i386.c binutils-2.27/bfd/elf32-i386.c
be6651
--- binutils.orig/bfd/elf32-i386.c	2017-05-17 11:22:32.393303573 +0100
be6651
+++ binutils-2.27/bfd/elf32-i386.c	2017-05-17 11:25:33.097138811 +0100
be6651
@@ -2322,8 +2322,7 @@ do_size:
be6651
       if (use_plt_got
be6651
 	  && h != NULL
be6651
 	  && h->plt.refcount > 0
be6651
-	  && (((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed)
be6651
-	      || h->got.refcount > 0)
be6651
+	  && h->got.refcount > 0
be6651
 	  && htab->plt_got == NULL)
be6651
 	{
be6651
 	  /* Create the GOT procedure linkage table.  */
be6651
@@ -2672,16 +2671,6 @@ elf_i386_allocate_dynrelocs (struct elf_
be6651
 	 if PLT is used.  */
be6651
       eh->func_pointer_refcount = 0;
be6651
 
be6651
-      if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed)
be6651
-	{
be6651
-	  /* Don't use the regular PLT for DF_BIND_NOW. */
be6651
-	  h->plt.offset = (bfd_vma) -1;
be6651
-
be6651
-	  /* Use the GOT PLT.  */
be6651
-	  h->got.refcount = 1;
be6651
-	  eh->plt_got.refcount = 1;
be6651
-	}
be6651
-
be6651
       use_plt_got = eh->plt_got.refcount > 0;
be6651
 
be6651
       /* Make sure this symbol is output as a dynamic symbol.
be6651
diff -rup binutils.orig/bfd/elf64-x86-64.c binutils-2.27/bfd/elf64-x86-64.c
be6651
--- binutils.orig/bfd/elf64-x86-64.c	2017-05-17 11:22:32.396303537 +0100
be6651
+++ binutils-2.27/bfd/elf64-x86-64.c	2017-05-17 11:26:00.250813521 +0100
be6651
@@ -2722,8 +2722,7 @@ do_size:
be6651
       if (use_plt_got
be6651
 	  && h != NULL
be6651
 	  && h->plt.refcount > 0
be6651
-	  && (((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed)
be6651
-	      || h->got.refcount > 0)
be6651
+	  && h->got.refcount > 0
be6651
 	  && htab->plt_got == NULL)
be6651
 	{
be6651
 	  /* Create the GOT procedure linkage table.  */
be6651
@@ -3094,16 +3093,6 @@ elf_x86_64_allocate_dynrelocs (struct el
be6651
 	 if PLT is used.  */
be6651
       eh->func_pointer_refcount = 0;
be6651
 
be6651
-      if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed)
be6651
-	{
be6651
-	  /* Don't use the regular PLT for DF_BIND_NOW. */
be6651
-	  h->plt.offset = (bfd_vma) -1;
be6651
-
be6651
-	  /* Use the GOT PLT.  */
be6651
-	  h->got.refcount = 1;
be6651
-	  eh->plt_got.refcount = 1;
be6651
-	}
be6651
-
be6651
       use_plt_got = eh->plt_got.refcount > 0;
be6651
 
be6651
       /* Make sure this symbol is output as a dynamic symbol.
be6651
diff -rup binutils.orig/ld/testsuite/ld-i386/pr17689now.rd binutils-2.27/ld/testsuite/ld-i386/pr17689now.rd
be6651
--- binutils.orig/ld/testsuite/ld-i386/pr17689now.rd	2017-05-17 11:22:32.677300171 +0100
be6651
+++ binutils-2.27/ld/testsuite/ld-i386/pr17689now.rd	2017-05-17 11:39:36.097021963 +0100
be6651
@@ -1,4 +1,3 @@
be6651
-#failif
be6651
 #...
be6651
 [0-9a-f ]+R_386_JUMP_SLOT +0+.*
be6651
 #...
be6651
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr17689now.rd binutils-2.27/ld/testsuite/ld-x86-64/pr17689now.rd
be6651
--- binutils.orig/ld/testsuite/ld-x86-64/pr17689now.rd	2017-05-17 11:22:32.734299489 +0100
be6651
+++ binutils-2.27/ld/testsuite/ld-x86-64/pr17689now.rd	2017-05-17 11:39:53.071818174 +0100
be6651
@@ -1,4 +1,3 @@
be6651
-#failif
be6651
 #...
be6651
 [0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +.*
be6651
 #...