[llvm] r184633 - RelocVisitor: Add another PPC64 relocation that occurs in dwarf output.

Benjamin Kramer benny.kra at googlemail.com
Sat Jun 22 06:03:15 PDT 2013


Author: d0k
Date: Sat Jun 22 08:03:15 2013
New Revision: 184633

URL: http://llvm.org/viewvc/llvm-project?rev=184633&view=rev
Log:
RelocVisitor: Add another PPC64 relocation that occurs in dwarf output.

Should bring the ppc64 buildbot back to life.

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=184633&r1=184632&r2=184633&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/RelocVisitor.h (original)
+++ llvm/trunk/include/llvm/Object/RelocVisitor.h Sat Jun 22 08:03:15 2013
@@ -81,6 +81,8 @@ public:
       switch (RelocType) {
       case llvm::ELF::R_PPC64_ADDR32:
         return visitELF_PPC64_ADDR32(R, Value);
+      case llvm::ELF::R_PPC64_ADDR64:
+        return visitELF_PPC64_ADDR64(R, Value);
       default:
         HasError = true;
         return RelocToApply();
@@ -217,6 +219,10 @@ private:
     uint32_t Res = (Value + Addend) & 0xFFFFFFFF;
     return RelocToApply(Res, 4);
   }
+  RelocToApply visitELF_PPC64_ADDR64(RelocationRef R, uint64_t Value) {
+    int64_t Addend = getAddend64BE(R);
+    return RelocToApply(Value + Addend, 8);
+  }
 
   /// PPC32 ELF
   RelocToApply visitELF_PPC_ADDR32(RelocationRef R, uint64_t Value) {





More information about the llvm-commits mailing list