summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-10-23 01:36:33 +0000
committerLang Hames <lhames@gmail.com>2018-10-23 01:36:33 +0000
commit776f1d50c8e56294274eaea90c51ca8d301e8e47 (patch)
tree6d6ff6244f1185c30748e5ead57db0fe40e7f677 /llvm/test/ExecutionEngine
parent3d16af69cfec6073c70d1e54d905b2fd155f25c7 (diff)
downloadbcm5719-llvm-776f1d50c8e56294274eaea90c51ca8d301e8e47.tar.gz
bcm5719-llvm-776f1d50c8e56294274eaea90c51ca8d301e8e47.zip
[RuntimeDyld][COFF] Skip non-loaded sections when calculating ImageBase.
Non-loaded sections (whose unused load-address defaults to zero) should not be taken into account when calculating ImageBase, or ImageBase will be incorrectly set to 0. Patch by Andrew Scheidecker. Thanks Andrew! https://reviews.llvm.org/D51343 + // The Sections list may contain sections that weren't loaded for + // whatever reason: they may be debug sections, and ProcessAllSections + // is false, or they may be sections that contain 0 bytes. If the + // section isn't loaded, the load address will be 0, and it should not + // be included in the ImageBase calculation. llvm-svn: 344995
Diffstat (limited to 'llvm/test/ExecutionEngine')
-rw-r--r--llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64_IMGREL.s6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64_IMGREL.s b/llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64_IMGREL.s
index 8f7e2043218..ac097c44e5f 100644
--- a/llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64_IMGREL.s
+++ b/llvm/test/ExecutionEngine/RuntimeDyld/X86/COFF_x86_64_IMGREL.s
@@ -1,6 +1,6 @@
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-mc -triple=x86_64-pc-win32 -filetype=obj -o %t/COFF_x86_64_IMGREL.o %s
-# RUN: llvm-rtdyld -triple=x86_64-pc-win32 -verify -check=%s %t/COFF_x86_64_IMGREL.o
+# RUN: llvm-rtdyld -triple=x86_64-pc-win32 -verify -target-addr-start=40960000000000 -check=%s %t/COFF_x86_64_IMGREL.o
.text
.def F;
.scl 2;
@@ -18,9 +18,9 @@
.align 16, 0x90
F: # @F
-# rtdyld-check: decode_operand(inst1, 3) = section_addr(COFF_x86_64_IMGREL.o, .text)+0
+# rtdyld-check: decode_operand(inst1, 3) = section_addr(COFF_x86_64_IMGREL.o, .text)+0-40960000000000
inst1:
mov %ebx, F@IMGREL
-# rtdyld-check: decode_operand(inst2, 3) = section_addr(COFF_x86_64_IMGREL.o, .rdata)+5
+# rtdyld-check: decode_operand(inst2, 3) = section_addr(COFF_x86_64_IMGREL.o, .rdata)+5-40960000000000
inst2:
mov %ebx, (__constdata@imgrel+5)
OpenPOWER on IntegriCloud