OSDN Git Service

[RuntimeDyld][COFF] Fix a think-o in the handling of the IMAGE_REL_AMD64_ADDR64
authorLang Hames <lhames@gmail.com>
Fri, 23 Oct 2015 18:46:43 +0000 (18:46 +0000)
committerLang Hames <lhames@gmail.com>
Fri, 23 Oct 2015 18:46:43 +0000 (18:46 +0000)
relocation that was introduced in r250733.

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

lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64.s

index adaeae0..1677081 100644 (file)
@@ -96,7 +96,7 @@ public:
     }
 
     case COFF::IMAGE_REL_AMD64_ADDR64: {
-      writeBytesUnaligned(0, Target, Value + RE.Addend);
+      writeBytesUnaligned(Value + RE.Addend, Target, 8);
       break;
     }
 
index fc0f3e8..a865bdb 100644 (file)
@@ -28,6 +28,12 @@ inst1:
 .Ltmp2:
        .seh_endproc
 
+        .data
+       .globl  x                       # @x
+# rtdyld-check: *{8}x = F
+x:
+       .quad   F
+
 # Make sure the JIT doesn't bail out on BSS sections.
         .bss
 bss_check: