forked from OSchip/llvm-project
Support LE in RelocVisitor::visitELF_PPC64_*
Since we now support both LE and BE PPC64 variants, use of getAddend64BE is no longer correct. Use the generic getELFRelocationAddend instead, as was already done for Mips. llvm-svn: 211170
This commit is contained in:
parent
78f8b7b652
commit
457e606d1f
|
@ -253,12 +253,14 @@ private:
|
|||
|
||||
/// PPC64 ELF
|
||||
RelocToApply visitELF_PPC64_ADDR32(RelocationRef R, uint64_t Value) {
|
||||
int64_t Addend = getAddend64BE(R);
|
||||
int64_t Addend;
|
||||
getELFRelocationAddend(R, Addend);
|
||||
uint32_t Res = (Value + Addend) & 0xFFFFFFFF;
|
||||
return RelocToApply(Res, 4);
|
||||
}
|
||||
RelocToApply visitELF_PPC64_ADDR64(RelocationRef R, uint64_t Value) {
|
||||
int64_t Addend = getAddend64BE(R);
|
||||
int64_t Addend;
|
||||
getELFRelocationAddend(R, Addend);
|
||||
return RelocToApply(Value + Addend, 8);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue