aboutsummaryrefslogtreecommitdiff
path: root/test/COFF/header-size.s
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:05:49 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:05:49 +0000
commite2fd426bdafe9f5c10066d3926ece6e342184a67 (patch)
treebfbbb5fd38554e6b8988b7a217e9fd0623728d7d /test/COFF/header-size.s
parent84c4061b34e048f47e5eb4fbabc1558495e8157c (diff)
Vendor import of lld trunk r351319 (just before the release_80 branchvendor/lld/lld-trunk-r351319
Notes
Notes: svn path=/vendor/lld/dist/; revision=343179 svn path=/vendor/lld/lld-trunk-r351319/; revision=343180; tag=vendor/lld/lld-trunk-r351319
Diffstat (limited to 'test/COFF/header-size.s')
-rw-r--r--test/COFF/header-size.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/COFF/header-size.s b/test/COFF/header-size.s
new file mode 100644
index 000000000000..3373cdea84f0
--- /dev/null
+++ b/test/COFF/header-size.s
@@ -0,0 +1,12 @@
+// REQUIRES: x86
+// RUN: llvm-mc -filetype=obj -triple=x86_64-windows %s -o %t.obj
+// RUN: lld-link -entry:main -subsystem:console %t.obj -out:%t.exe
+// RUN: llvm-readobj -sections %t.exe | FileCheck %s
+ .globl main
+main:
+ ret
+
+// Check that the first section data comes at 512 bytes in the file.
+// If the size allocated for headers would include size for section
+// headers which aren't written, PointerToRawData would be 0x400 instead.
+// CHECK: PointerToRawData: 0x200