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

e89428
diff -rupN --no-dereference binutils-2.37/bfd/elfxx-x86.c binutils-2.37-new/bfd/elfxx-x86.c
e89428
--- binutils-2.37/bfd/elfxx-x86.c	2021-07-08 13:37:19.000000000 +0200
e89428
+++ binutils-2.37-new/bfd/elfxx-x86.c	2021-07-24 21:59:08.085910370 +0200
e89428
@@ -107,7 +107,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
e89428
   plt_entry_size = htab->plt.plt_entry_size;
e89428
 
e89428
   resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
e89428
-
e89428
+#if 0
e89428
   /* We can't use the GOT PLT if pointer equality is needed since
e89428
      finish_dynamic_symbol won't clear symbol value and the dynamic
e89428
      linker won't update the GOT slot.  We will get into an infinite
e89428
@@ -125,7 +125,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
e89428
       /* Use the GOT PLT.  */
e89428
       eh->plt_got.refcount = 1;
e89428
     }
e89428
-
e89428
+#endif
e89428
   /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
e89428
      here if it is defined and referenced in a non-shared object.  */
e89428
   if (h->type == STT_GNU_IFUNC
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/pltgot-1.d binutils-2.37-new/ld/testsuite/ld-i386/pltgot-1.d
e89428
--- binutils-2.37/ld/testsuite/ld-i386/pltgot-1.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-i386/pltgot-1.d	2021-07-24 21:59:08.086910360 +0200
e89428
@@ -2,6 +2,7 @@
e89428
 #readelf: -S --wide
e89428
 #as: --32
e89428
 
e89428
+#pass
e89428
 #...
e89428
  +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
e89428
 #...
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/pltgot-2.d binutils-2.37-new/ld/testsuite/ld-i386/pltgot-2.d
e89428
--- binutils-2.37/ld/testsuite/ld-i386/pltgot-2.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-i386/pltgot-2.d	2021-07-24 21:59:08.086910360 +0200
e89428
@@ -3,7 +3,6 @@
e89428
 #readelf: -d --wide
e89428
 #as: --32
e89428
 
e89428
-#failif
e89428
 #...
e89428
  +0x[0-9a-f]+ +\(PLTREL.*
e89428
 #...
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/pr19636-2d.d binutils-2.37-new/ld/testsuite/ld-i386/pr19636-2d.d
e89428
--- binutils-2.37/ld/testsuite/ld-i386/pr19636-2d.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-i386/pr19636-2d.d	2021-07-24 21:59:08.086910360 +0200
e89428
@@ -8,7 +8,7 @@ Relocation section '\.rel\.dyn' at offse
e89428
 [0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
e89428
 [0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
e89428
 [0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
e89428
-
e89428
+#...
e89428
 Symbol table '\.dynsym' contains [0-9]+ entries:
e89428
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
e89428
 #...
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/pr19636-2e.d binutils-2.37-new/ld/testsuite/ld-i386/pr19636-2e.d
e89428
--- binutils-2.37/ld/testsuite/ld-i386/pr19636-2e.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-i386/pr19636-2e.d	2021-07-24 21:59:08.086910360 +0200
e89428
@@ -8,7 +8,7 @@ Relocation section '\.rel\.dyn' at offse
e89428
 [0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
e89428
 [0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
e89428
 [0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
e89428
-
e89428
+#...
e89428
 Symbol table '\.dynsym' contains [0-9]+ entries:
e89428
  +Num: +Value +Size Type +Bind +Vis +Ndx Name
e89428
 #...
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-i386/pr20830.d binutils-2.37-new/ld/testsuite/ld-i386/pr20830.d
e89428
--- binutils-2.37/ld/testsuite/ld-i386/pr20830.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-i386/pr20830.d	2021-07-24 21:59:08.087910350 +0200
e89428
@@ -19,7 +19,7 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r8 \(eip\) at cfa-4
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
-
e89428
+#pass
e89428
 0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pltgot-1.d binutils-2.37-new/ld/testsuite/ld-x86-64/pltgot-1.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pltgot-1.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pltgot-1.d	2021-07-24 21:59:08.087910350 +0200
e89428
@@ -2,8 +2,4 @@
e89428
 #readelf: -S --wide
e89428
 #as: --64
e89428
 
e89428
-#...
e89428
- +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
e89428
-#...
e89428
- +\[ *[0-9]+\] \.got\.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+18 +.*
e89428
 #pass
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.37-new/ld/testsuite/ld-x86-64/pltgot-2.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pltgot-2.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pltgot-2.d	2021-07-24 21:59:08.087910350 +0200
e89428
@@ -3,7 +3,6 @@
e89428
 #readelf: -d --wide
e89428
 #as: --64
e89428
 
e89428
-#failif
e89428
 #...
e89428
  +0x[0-9a-f]+ +\(PLTREL.*
e89428
 #...
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.37-new/ld/testsuite/ld-x86-64/plt-main.rd
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/plt-main.rd	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/plt-main.rd	2021-07-24 21:59:08.087910350 +0200
e89428
@@ -1,4 +1,3 @@
e89428
-#failif
e89428
 #...
e89428
 [0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 0
e89428
 #...
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr20830a.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830a.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr20830a.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830a.d	2021-07-24 21:59:08.088910340 +0200
e89428
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
+#pass
e89428
 
e89428
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr20830a-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830a-now.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr20830a-now.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830a-now.d	2021-07-24 21:59:08.088910340 +0200
e89428
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
+#pass
e89428
 
e89428
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr20830b.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830b.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr20830b.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830b.d	2021-07-24 21:59:08.088910340 +0200
e89428
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
-
e89428
+#pass
e89428
+ 
e89428
 0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830b-now.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr20830b-now.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr20830b-now.d	2021-07-24 21:59:08.088910340 +0200
e89428
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
-
e89428
+#pass
e89428
+ 
e89428
 0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038a.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038a.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038a.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038a.d	2021-07-24 21:59:08.089910331 +0200
e89428
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
-
e89428
+#pass
e89428
+  
e89428
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038a-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038a-now.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038a-now.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038a-now.d	2021-07-24 21:59:08.089910331 +0200
e89428
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
-
e89428
+#pass
e89428
+  
e89428
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038b.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038b.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038b.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038b.d	2021-07-24 21:59:08.089910331 +0200
e89428
@@ -19,6 +19,7 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
+#pass
e89428
 
e89428
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038b-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038b-now.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038b-now.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038b-now.d	2021-07-24 21:59:08.089910331 +0200
e89428
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
-
e89428
+#pass
e89428
+  
e89428
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038c.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038c.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038c.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038c.d	2021-07-24 21:59:08.089910331 +0200
e89428
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
-
e89428
+#pass
e89428
+  
e89428
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/pr21038c-now.d binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038c-now.d
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/pr21038c-now.d	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/pr21038c-now.d	2021-07-24 21:59:08.090910321 +0200
e89428
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
e89428
   DW_CFA_offset: r16 \(rip\) at cfa-8
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
-
e89428
+#pass
e89428
+  
e89428
 0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
e89428
   DW_CFA_nop
e89428
   DW_CFA_nop
e89428
diff -rupN --no-dereference binutils-2.37/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.37-new/ld/testsuite/ld-x86-64/tlspic2.rd
e89428
--- binutils-2.37/ld/testsuite/ld-x86-64/tlspic2.rd	2021-07-08 13:37:20.000000000 +0200
e89428
+++ binutils-2.37-new/ld/testsuite/ld-x86-64/tlspic2.rd	2021-07-24 21:59:08.090910321 +0200
e89428
@@ -14,6 +14,7 @@ Section Headers:
e89428
  +\[[ 0-9]+\] .dynsym +.*
e89428
  +\[[ 0-9]+\] .dynstr +.*
e89428
  +\[[ 0-9]+\] .rela.dyn +.*
e89428
+#pass
e89428
  +\[[ 0-9]+\] .plt +.*
e89428
  +\[[ 0-9]+\] .plt.got +.*
e89428
  +\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+31a 00 +AX +0 +0 4096