diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-04-04 15:21:21 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-04-04 15:21:21 +0000 |
| commit | 785a79133b124d82c7124c8bff1727cf950fb1d4 (patch) | |
| tree | eb11b321e3ec0fdd02d82ef2893c1c209b109437 | |
| parent | 0cc0306a758be76af2072a75a148e1975591a742 (diff) | |
| download | bcm5719-llvm-785a79133b124d82c7124c8bff1727cf950fb1d4.tar.gz bcm5719-llvm-785a79133b124d82c7124c8bff1727cf950fb1d4.zip | |
[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
llvm-svn: 329203
| -rw-r--r-- | lld/ELF/Arch/X86_64.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/Arch/X86_64.cpp b/lld/ELF/Arch/X86_64.cpp index 879fe31dfba..3804adea858 100644 --- a/lld/ELF/Arch/X86_64.cpp +++ b/lld/ELF/Arch/X86_64.cpp @@ -156,9 +156,8 @@ void X86_64<ELFT>::writePlt(uint8_t *Buf, uint64_t GotPltEntryAddr, } 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> |

