[PATCH] D45252: [ELF] - X86_64: Use white list for relocations checked by isPicRel.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 4 04:49:12 PDT 2018
grimar created this revision.
grimar added reviewers: ruiu, espindola.
Herald added subscribers: arichardson, emaste.
`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.
https://reviews.llvm.org/D45252
Files:
ELF/Arch/X86_64.cpp
Index: ELF/Arch/X86_64.cpp
===================================================================
--- ELF/Arch/X86_64.cpp
+++ ELF/Arch/X86_64.cpp
@@ -156,9 +156,8 @@
}
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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45252.140936.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180404/4a5efe90/attachment.bin>
More information about the llvm-commits
mailing list