[MCJIT] [AArch64] Make sure to propegate ARM64_RELOC_ADDEND values into the
authorLang Hames <lhames@gmail.com>
Fri, 18 Jul 2014 20:29:36 +0000 (20:29 +0000)
committerLang Hames <lhames@gmail.com>
Fri, 18 Jul 2014 20:29:36 +0000 (20:29 +0000)
RelocationEntry.

No test case yet, as this primarily hits GOT entries, which RuntimeDyldChecker
can't examine yet. I'm actively working on features that will enable us to
test this.

llvm-svn: 213408

llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h

index 9f48e44..775ed9e 100644 (file)
@@ -59,8 +59,10 @@ public:
     RelocationValueRef Value(
         getRelocationValueRef(ObjImg, RelI, RE, ObjSectionToID, Symbols));
 
-    if (HasExplicitAddend)
+    if (HasExplicitAddend) {
+      RE.Addend = ExplicitAddend;
       Value.Addend = ExplicitAddend;
+    }
 
     bool IsExtern = Obj.getPlainRelocationExternal(RelInfo);
     if (!IsExtern && RE.IsPCRel)