diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:05:49 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:05:49 +0000 |
| commit | e2fd426bdafe9f5c10066d3926ece6e342184a67 (patch) | |
| tree | bfbbb5fd38554e6b8988b7a217e9fd0623728d7d /ELF/Arch/PPC.cpp | |
| parent | 84c4061b34e048f47e5eb4fbabc1558495e8157c (diff) | |
Notes
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 20cae0e59cf4..767378067341 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)); |
