[lld] r329203 - [ELF] - X86_64: Use white list for relocations checked by isPicRel.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 4 08:21:21 PDT 2018
Author: grimar
Date: Wed Apr 4 08:21:21 2018
New Revision: 329203
URL: http://llvm.org/viewvc/llvm-project?rev=329203&view=rev
Log:
[ELF] - X86_64: Use white list for relocations checked by isPicRel.
isPicRel is used to check if we want to create the dynamic relocations.
Not all of the dynamic relocations we create are passing through this
check, but those that are, probably better be whitelisted.
Differential revision: https://reviews.llvm.org/D45252
Modified:
lld/trunk/ELF/Arch/X86_64.cpp
Modified: lld/trunk/ELF/Arch/X86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/X86_64.cpp?rev=329203&r1=329202&r2=329203&view=diff
==============================================================================
--- lld/trunk/ELF/Arch/X86_64.cpp (original)
+++ lld/trunk/ELF/Arch/X86_64.cpp Wed Apr 4 08:21:21 2018
@@ -156,9 +156,8 @@ void X86_64<ELFT>::writePlt(uint8_t *Buf
}
template <class ELFT> bool X86_64<ELFT>::isPicRel(RelType Type) const {
- return Type != R_X86_64_8 && Type != R_X86_64_PC8 && Type != R_X86_64_16 &&
- Type != R_X86_64_PC16 && Type != R_X86_64_32 &&
- Type != R_X86_64_PC32 && Type != R_X86_64_TPOFF32;
+ return Type == R_X86_64_64 || Type == R_X86_64_PC64 ||
+ Type == R_X86_64_SIZE32 || Type == R_X86_64_SIZE64;
}
template <class ELFT>
More information about the llvm-commits
mailing list