[llvm] r211170 - Support LE in RelocVisitor::visitELF_PPC64_*

Ulrich Weigand ulrich.weigand at de.ibm.com
Wed Jun 18 08:15:49 PDT 2014


Author: uweigand
Date: Wed Jun 18 10:15:49 2014
New Revision: 211170

URL: http://llvm.org/viewvc/llvm-project?rev=211170&view=rev
Log:
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.


Modified:
    llvm/trunk/include/llvm/Object/RelocVisitor.h

Modified: llvm/trunk/include/llvm/Object/RelocVisitor.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/RelocVisitor.h?rev=211170&r1=211169&r2=211170&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/RelocVisitor.h (original)
+++ llvm/trunk/include/llvm/Object/RelocVisitor.h Wed Jun 18 10:15:49 2014
@@ -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);
   }
 





More information about the llvm-commits mailing list