[PATCH] D13522: [ELF2] - fix for using PLT/GOT for X86TargetInfo
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 11:48:13 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249588: [ELF2] - fix to use PLT/GOT for DSO function calls (X86TargetInfo) (authored by grimar).
Changed prior to commit:
http://reviews.llvm.org/D13522?vs=36768&id=36774#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13522
Files:
lld/trunk/ELF/Target.cpp
lld/trunk/test/elf2/relocation-i686.s
Index: lld/trunk/test/elf2/relocation-i686.s
===================================================================
--- lld/trunk/test/elf2/relocation-i686.s
+++ lld/trunk/test/elf2/relocation-i686.s
@@ -62,7 +62,7 @@
call bar+4
// CHECK: Disassembly of section .dynamic_reloc:
// CHECK-NEXT: .dynamic_reloc:
-// CHECK-NEXT: 12019: e8 00 00 00 00 calll 0
+// CHECK-NEXT: 12019: e8 16 00 00 00 calll 22
.section .R_386_GOT32,"ax", at progbits
.global R_386_GOT32
Index: lld/trunk/ELF/Target.cpp
===================================================================
--- lld/trunk/ELF/Target.cpp
+++ lld/trunk/ELF/Target.cpp
@@ -56,7 +56,7 @@
}
bool X86TargetInfo::relocNeedsPlt(uint32_t Type, const SymbolBody &S) const {
- return Type == R_386_PLT32;
+ return Type == R_386_PLT32 || (Type == R_386_PC32 && S.isShared());
}
static void add32le(uint8_t *L, int32_t V) { write32le(L, read32le(L) + V); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13522.36774.patch
Type: text/x-patch
Size: 930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151007/f0f5ec8a/attachment.bin>
More information about the llvm-commits
mailing list