Support LE in RelocVisitor::visitELF_PPC64_*
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Wed, 18 Jun 2014 15:15:49 +0000 (15:15 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Wed, 18 Jun 2014 15:15:49 +0000 (15:15 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211170 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Object/RelocVisitor.h

index a3aaf17f1d66fea43b421aa0f0e27614d95f8231..5ca245057a5512c902d35b60456ef8d989d66ab2 100644 (file)
@@ -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);
   }