diff options
Diffstat (limited to 'ELF/Arch/PPC.cpp')
-rw-r--r-- | ELF/Arch/PPC.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ELF/Arch/PPC.cpp b/ELF/Arch/PPC.cpp index 20cae0e59cf4e..7673780673413 100644 --- a/ELF/Arch/PPC.cpp +++ b/ELF/Arch/PPC.cpp @@ -29,6 +29,7 @@ public: } // namespace PPC::PPC() { + NoneRel = R_PPC_NONE; GotBaseSymOff = 0x8000; GotBaseSymInGotPlt = false; } @@ -36,6 +37,7 @@ PPC::PPC() { RelExpr PPC::getRelExpr(RelType Type, const Symbol &S, const uint8_t *Loc) const { switch (Type) { + case R_PPC_REL14: case R_PPC_REL24: case R_PPC_REL32: return R_PC; @@ -61,6 +63,9 @@ void PPC::relocateOne(uint8_t *Loc, RelType Type, uint64_t Val) const { case R_PPC_REL32: write32be(Loc, Val); break; + case R_PPC_REL14: + write32be(Loc, read32be(Loc) | (Val & 0xFFFC)); + break; case R_PPC_PLTREL24: case R_PPC_REL24: write32be(Loc, read32be(Loc) | (Val & 0x3FFFFFC)); |