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

d1152b
diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d
d1152b
--- binutils.orig/ld/testsuite/ld-i386/pltgot-1.d	2017-11-15 13:32:39.335065263 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d	2017-11-15 15:03:55.649727195 +0000
d1152b
@@ -2,6 +2,7 @@
d1152b
 #readelf: -S --wide
d1152b
 #as: --32
d1152b
 
d1152b
+#pass
d1152b
 #...
d1152b
  +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
d1152b
 #...
d1152b
diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d
d1152b
--- binutils.orig/ld/testsuite/ld-i386/pltgot-2.d	2017-11-15 13:32:39.329065335 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d	2017-11-15 15:04:20.803430034 +0000
d1152b
@@ -3,7 +3,6 @@
d1152b
 #readelf: -d --wide
d1152b
 #as: --32
d1152b
 
d1152b
-#failif
d1152b
 #...
d1152b
  +0x[0-9a-f]+ +\(PLTREL.*
d1152b
 #...
d1152b
diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d
d1152b
--- binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d	2017-11-15 13:32:39.336065251 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d	2017-11-15 15:03:00.413379749 +0000
d1152b
@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse
d1152b
 [0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
d1152b
 [0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
d1152b
 [0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
d1152b
-
d1152b
+#...
d1152b
 Symbol table '\.dynsym' contains [0-9]+ entries:
d1152b
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
d1152b
 #...
d1152b
diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d
d1152b
--- binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d	2017-11-15 13:32:39.330065323 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d	2017-11-15 15:03:28.928042882 +0000
d1152b
@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse
d1152b
 [0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
d1152b
 [0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
d1152b
 [0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
d1152b
-
d1152b
+#...
d1152b
 Symbol table '\.dynsym' contains [0-9]+ entries:
d1152b
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
d1152b
 #...
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d	2017-11-15 13:32:39.415064300 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d	2017-11-15 15:08:39.333375801 +0000
d1152b
@@ -2,8 +2,4 @@
d1152b
 #readelf: -S --wide
d1152b
 #as: --64
d1152b
 
d1152b
-#...
d1152b
- +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
d1152b
-#...
d1152b
- +\[ *[0-9]+\] \.got\.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+18 +.*
d1152b
 #pass
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d	2017-11-15 13:32:39.404064432 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d	2017-11-15 15:08:59.031143095 +0000
d1152b
@@ -3,7 +3,6 @@
d1152b
 #readelf: -d --wide
d1152b
 #as: --64
d1152b
 
d1152b
-#failif
d1152b
 #...
d1152b
  +0x[0-9a-f]+ +\(PLTREL.*
d1152b
 #...
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main-bnd.dd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-bnd.dd
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-bnd.dd	2017-11-15 13:32:39.405064420 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-bnd.dd	2017-11-15 15:06:53.694623801 +0000
d1152b
@@ -1,7 +1,4 @@
d1152b
-#...
d1152b
-Disassembly of section .plt.got:
d1152b
 
d1152b
-[a-f0-9]+ <[a-z_]+@plt>:
d1152b
-[ 	]*[a-f0-9]+:	f2 ff 25 .. .. 20 00 	bnd jmpq \*0x20....\(%rip\)        # ...... <.*>
d1152b
+#...
d1152b
 [ 	]*[a-f0-9]+:	90                   	nop
d1152b
 #pass
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd	2017-11-15 13:32:39.407064397 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd	2017-11-15 15:06:17.244054423 +0000
d1152b
@@ -1,4 +1,3 @@
d1152b
-#failif
d1152b
 #...
d1152b
 [0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 0
d1152b
 #...
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d	2017-11-15 13:32:39.412064336 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d	2017-11-15 15:15:09.918750288 +0000
d1152b
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
+#pass
d1152b
 
d1152b
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d	2017-11-15 13:32:39.413064324 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d	2017-11-15 15:16:08.227055104 +0000
d1152b
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
+#pass
d1152b
 
d1152b
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d	2017-11-15 13:32:39.413064324 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d	2017-11-15 15:16:20.115913358 +0000
d1152b
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
-
d1152b
+#pass
d1152b
+ 
d1152b
 0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d	2017-11-15 13:32:39.411064348 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d	2017-11-15 15:16:29.012807282 +0000
d1152b
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
-
d1152b
+#pass
d1152b
+ 
d1152b
 0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d	2017-11-15 13:32:39.408064384 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d	2017-11-15 15:19:48.097433680 +0000
d1152b
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
-
d1152b
+#pass
d1152b
+  
d1152b
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d	2017-11-15 13:32:39.401064469 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d	2017-11-15 15:10:56.077760324 +0000
d1152b
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
-
d1152b
+#pass
d1152b
+  
d1152b
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d	2017-11-15 13:32:39.405064420 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d	2017-11-15 15:10:42.828916844 +0000
d1152b
@@ -19,6 +19,7 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
+#pass
d1152b
 
d1152b
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d	2017-11-15 13:32:39.416064288 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d	2017-11-15 15:11:11.550577531 +0000
d1152b
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
-
d1152b
+#pass
d1152b
+  
d1152b
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d	2017-11-15 13:32:39.411064348 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d	2017-11-15 15:09:52.664509478 +0000
d1152b
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
-
d1152b
+#pass
d1152b
+  
d1152b
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d	2017-11-15 13:32:39.413064324 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d	2017-11-15 15:11:22.975442559 +0000
d1152b
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r16 \(rip\) at cfa-8
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
-
d1152b
+#pass
d1152b
+  
d1152b
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd	2017-11-15 13:32:39.417064276 +0000
d1152b
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd	2017-11-15 15:05:02.950932110 +0000
d1152b
@@ -14,6 +14,7 @@ Section Headers:
d1152b
  +\[[ 0-9]+\] .dynsym +.*
d1152b
  +\[[ 0-9]+\] .dynstr +.*
d1152b
  +\[[ 0-9]+\] .rela.dyn +.*
d1152b
+#pass
d1152b
  +\[[ 0-9]+\] .plt +.*
d1152b
  +\[[ 0-9]+\] .plt.got +.*
d1152b
  +\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+31a 00 +AX +0 +0 4096
d1152b
--- binutils.orig/bfd/elfxx-x86.c	2018-01-22 15:59:25.875788033 +0000
d1152b
+++ binutils-2.30.0/bfd/elfxx-x86.c	2018-01-22 16:00:20.789146597 +0000
d1152b
@@ -107,7 +107,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
d1152b
   plt_entry_size = htab->plt.plt_entry_size;
d1152b
 
d1152b
   resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
d1152b
-
d1152b
+#if 0
d1152b
   /* We can't use the GOT PLT if pointer equality is needed since
d1152b
      finish_dynamic_symbol won't clear symbol value and the dynamic
d1152b
      linker won't update the GOT slot.  We will get into an infinite
d1152b
@@ -125,7 +125,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
d1152b
       /* Use the GOT PLT.  */
d1152b
       eh->plt_got.refcount = 1;
d1152b
     }
d1152b
-
d1152b
+#endif
d1152b
   /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
d1152b
      here if it is defined and referenced in a non-shared object.  */
d1152b
   if (h->type == STT_GNU_IFUNC
d1152b
--- binutils.orig/ld/testsuite/ld-i386/pr20830.d	2018-07-09 09:49:51.277239857 +0100
d1152b
+++ binutils-2.30.90/ld/testsuite/ld-i386/pr20830.d	2018-07-09 10:32:41.113356733 +0100
d1152b
@@ -19,7 +19,7 @@ Contents of the .eh_frame section:
d1152b
   DW_CFA_offset: r8 \(eip\) at cfa-4
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
-
d1152b
+#pass
d1152b
 0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133
d1152b
   DW_CFA_nop
d1152b
   DW_CFA_nop
d1152b
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd	2020-07-24 14:55:25.370646189 +0100
d1152b
+++ binutils-2.35/ld/testsuite/ld-x86-64/plt-main-ibt.dd	2020-07-24 15:06:58.124189348 +0100
d1152b
@@ -1,7 +1,3 @@
d1152b
 #...
d1152b
-Disassembly of section .plt.got:
d1152b
-
d1152b
-[a-f0-9]+ <[_a-z]+@plt>:
d1152b
 [ 	]*[a-f0-9]+:	f3 0f 1e fa          	endbr64 
d1152b
-[ 	]*[a-f0-9]+:	f2 ff 25 .. .. 20 00 	bnd jmpq \*0x20....\(%rip\)        # ...... <.*>
d1152b
 #pass