From: Lang Hames Date: Fri, 23 Oct 2015 18:46:43 +0000 (+0000) Subject: [RuntimeDyld][COFF] Fix a think-o in the handling of the IMAGE_REL_AMD64_ADDR64 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2f7d3cda4ab0b5e4551bef8a8809e8c8a4bccf58;p=oota-llvm.git [RuntimeDyld][COFF] Fix a think-o in the handling of the IMAGE_REL_AMD64_ADDR64 relocation that was introduced in r250733. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251135 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h index adaeae0702e..167708156dd 100644 --- a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h +++ b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h @@ -96,7 +96,7 @@ public: } case COFF::IMAGE_REL_AMD64_ADDR64: { - writeBytesUnaligned(0, Target, Value + RE.Addend); + writeBytesUnaligned(Value + RE.Addend, Target, 8); break; } diff --git a/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64.s b/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64.s index fc0f3e85147..a865bdbfc4c 100644 --- a/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64.s +++ b/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64.s @@ -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: