[PATCH] D13522: [ELF2] - fix for using PLT/GOT for X86TargetInfo
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 11:19:09 PDT 2015
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM with a nit.
================
Comment at: ELF/Target.cpp:59-66
@@ -58,3 +58,10 @@
bool X86TargetInfo::relocNeedsPlt(uint32_t Type, const SymbolBody &S) const {
- return Type == R_386_PLT32;
+ switch (Type) {
+ default:
+ return false;
+ case R_386_PC32:
+ return S.isShared();
+ case R_386_PLT32:
+ return true;
+ }
}
----------------
return Type == R_386_PLT32 || (Type == R_386_PC32 && S.isShared());
http://reviews.llvm.org/D13522
More information about the llvm-commits
mailing list