diff options
Diffstat (limited to 'lld/ELF/Arch/PPC.cpp')
| -rw-r--r-- | lld/ELF/Arch/PPC.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lld/ELF/Arch/PPC.cpp b/lld/ELF/Arch/PPC.cpp index 45f799c3687..30b6966ffbd 100644 --- a/lld/ELF/Arch/PPC.cpp +++ b/lld/ELF/Arch/PPC.cpp @@ -23,6 +23,9 @@ namespace { class PPC final : public TargetInfo { public: PPC(); + RelExpr getRelExpr(RelType Type, const Symbol &S, + const uint8_t *Loc) const override; + RelType getDynRel(RelType Type) const override; void writeGotHeader(uint8_t *Buf) const override; void writePltHeader(uint8_t *Buf) const override { llvm_unreachable("should call writePPC32GlinkSection() instead"); @@ -36,8 +39,6 @@ public: uint64_t BranchAddr, const Symbol &S) const override; uint32_t getThunkSectionSpacing() const override; bool inBranchRange(RelType Type, uint64_t Src, uint64_t Dst) const override; - RelExpr getRelExpr(RelType Type, const Symbol &S, - const uint8_t *Loc) const override; void relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const override; RelExpr adjustRelaxExpr(RelType Type, const uint8_t *Data, RelExpr Expr) const override; @@ -230,6 +231,12 @@ RelExpr PPC::getRelExpr(RelType Type, const Symbol &S, } } +RelType PPC::getDynRel(RelType Type) const { + if (Type == R_PPC_ADDR32) + return Type; + return R_PPC_NONE; +} + static std::pair<RelType, uint64_t> fromDTPREL(RelType Type, uint64_t Val) { uint64_t DTPBiasedVal = Val - 0x8000; switch (Type) { |

