[llvm-branch-commits] [lld] r352489 - Merging r352413:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 29 05:22:08 PST 2019


Author: hans
Date: Tue Jan 29 05:22:08 2019
New Revision: 352489

URL: http://llvm.org/viewvc/llvm-project?rev=352489&view=rev
Log:
Merging r352413:
------------------------------------------------------------------------
r352413 | pcc | 2019-01-28 20:29:41 +0100 (Mon, 28 Jan 2019) | 8 lines

ELF: Set sh_info on RelaIplt to point to the IgotPlt output section.

Previously we were setting it to the GotPlt output section, which is
incorrect on ARM where this section is in .got. In static binaries
this can lead to sh_info being set to -1 (because there is no .got.plt)
which results in various tools rejecting the output file.

Differential Revision: https://reviews.llvm.org/D57274
------------------------------------------------------------------------

Modified:
    lld/branches/release_80/   (props changed)
    lld/branches/release_80/ELF/SyntheticSections.cpp
    lld/branches/release_80/test/ELF/arm-gnu-ifunc.s

Propchange: lld/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 29 05:22:08 2019
@@ -1 +1 @@
-/lld/trunk:351326,351335,351898-351899,352068,352082,352257,352302
+/lld/trunk:351326,351335,351898-351899,352068,352082,352257,352302,352413

Modified: lld/branches/release_80/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_80/ELF/SyntheticSections.cpp?rev=352489&r1=352488&r2=352489&view=diff
==============================================================================
--- lld/branches/release_80/ELF/SyntheticSections.cpp (original)
+++ lld/branches/release_80/ELF/SyntheticSections.cpp Tue Jan 29 05:22:08 2019
@@ -1513,8 +1513,10 @@ void RelocationBaseSection::finalizeCont
   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()

Modified: lld/branches/release_80/test/ELF/arm-gnu-ifunc.s
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_80/test/ELF/arm-gnu-ifunc.s?rev=352489&r1=352488&r2=352489&view=diff
==============================================================================
--- lld/branches/release_80/test/ELF/arm-gnu-ifunc.s (original)
+++ lld/branches/release_80/test/ELF/arm-gnu-ifunc.s Tue Jan 29 05:22:08 2019
@@ -35,6 +35,8 @@ _start:
 // 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 @@ _start:
 // 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




More information about the llvm-branch-commits mailing list