diff options
Diffstat (limited to 'lld/ELF/Target.cpp')
-rw-r--r-- | lld/ELF/Target.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index df7b34cf849..8d3a3515d5a 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -221,6 +221,7 @@ PPC64TargetInfo::PPC64TargetInfo() { PCRelReloc = R_PPC64_REL24; GotReloc = R_PPC64_GLOB_DAT; GotRefReloc = R_PPC64_REL64; + RelativeReloc = R_PPC64_RELATIVE; PltEntrySize = 32; // We need 64K pages (at least under glibc/Linux, the loader won't @@ -291,6 +292,20 @@ bool PPC64TargetInfo::relocNeedsPlt(uint32_t Type, const SymbolBody &S) const { return S.isShared() || (S.isUndefined() && S.isWeak()); } +bool PPC64TargetInfo::isRelRelative(uint32_t Type) const { + switch (Type) { + default: + return false; + case R_PPC64_REL24: + case R_PPC64_REL14: + case R_PPC64_REL14_BRTAKEN: + case R_PPC64_REL14_BRNTAKEN: + case R_PPC64_REL32: + case R_PPC64_REL64: + return true; + } +} + void PPC64TargetInfo::relocateOne(uint8_t *Buf, const void *RelP, uint32_t Type, uint64_t BaseAddr, uint64_t SymVA) const { typedef ELFFile<ELF64BE>::Elf_Rela Elf_Rela; |