[PATCH] D57274: ELF: Set sh_info on RelaIplt to point to the IgotPlt output section.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 11:29:47 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD352413: ELF: Set sh_info on RelaIplt to point to the IgotPlt output section. (authored by pcc, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D57274?vs=183672&id=183920#toc

Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57274/new/

https://reviews.llvm.org/D57274

Files:
  ELF/SyntheticSections.cpp
  test/ELF/arm-gnu-ifunc.s


Index: test/ELF/arm-gnu-ifunc.s
===================================================================
--- test/ELF/arm-gnu-ifunc.s
+++ test/ELF/arm-gnu-ifunc.s
@@ -35,6 +35,8 @@
 // CHECK-NEXT:     Address: 0x100F4
 // CHECK-NEXT:     Offset: 0xF4
 // CHECK-NEXT:     Size: 16
+// CHECK-NEXT:     Link:
+// CHECK-NEXT:     Info: 4
 // CHECK:          Name: .plt
 // CHECK-NEXT:     Type: SHT_PROGBITS
 // CHECK-NEXT:     Flags [
@@ -44,7 +46,8 @@
 // CHECK-NEXT:     Address: 0x11020
 // CHECK-NEXT:     Offset: 0x1020
 // CHECK-NEXT:     Size: 32
-// CHECK:          Name: .got
+// CHECK:          Index: 4
+// CHECK-NEXT:     Name: .got
 // CHECK-NEXT:     Type: SHT_PROGBITS
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
Index: ELF/SyntheticSections.cpp
===================================================================
--- ELF/SyntheticSections.cpp
+++ ELF/SyntheticSections.cpp
@@ -1512,8 +1512,10 @@
   else
     getParent()->Link = 0;
 
-  if (In.RelaIplt == this || In.RelaPlt == this)
+  if (In.RelaPlt == this)
     getParent()->Info = In.GotPlt->getParent()->SectionIndex;
+  if (In.RelaIplt == this)
+    getParent()->Info = In.IgotPlt->getParent()->SectionIndex;
 }
 
 RelrBaseSection::RelrBaseSection()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57274.183920.patch
Type: text/x-patch
Size: 1231 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190128/8e594704/attachment.bin>


More information about the llvm-commits mailing list