Support/ConvertUTF: implement U+FFFD insertion according to the recommendation
[oota-llvm.git] / include / llvm / Object / RelocVisitor.h
index c72db2ce412918078952b73f6e1144239bb0c1f9..a3aaf17f1d66fea43b421aa0f0e27614d95f8231 100644 (file)
@@ -153,6 +153,14 @@ public:
         HasError = true;
         return RelocToApply();
       }
+    } else if (FileFormat == "ELF32-arm") {
+      switch (RelocType) {
+      default:
+        HasError = true;
+        return RelocToApply();
+      case llvm::ELF::R_ARM_ABS32:
+        return visitELF_ARM_ABS32(R, Value);
+      }
     }
     HasError = true;
     return RelocToApply();
@@ -325,6 +333,11 @@ private:
     return RelocToApply(Value + Addend, 8);
   }
 
+  RelocToApply visitELF_ARM_ABS32(RelocationRef R, uint64_t Value) {
+    int64_t Addend = getAddend32LE(R);
+    return RelocToApply(Value + Addend, 4);
+  }
+
 };
 
 }