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

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