summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2012-11-13 22:04:09 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2012-11-13 22:04:09 +0000
commit4de5872dede6e3dd80f7ab3df5df4fe0e33e3b2e (patch)
tree4ca539a98f66a64d894cb7beb5d4592974e77f2e /test
parent2aac6161e41c4b415d3922fb4d6dcc5da1fe8d68 (diff)
downloadllvm-4de5872dede6e3dd80f7ab3df5df4fe0e33e3b2e.tar.gz
llvm-4de5872dede6e3dd80f7ab3df5df4fe0e33e3b2e.tar.bz2
llvm-4de5872dede6e3dd80f7ab3df5df4fe0e33e3b2e.tar.xz
[MC][COFF] Emit weak symbols to the correct section. Patch by Dmitry Puzirev!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/COFF/weak-symbol-section-specification.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/MC/COFF/weak-symbol-section-specification.ll b/test/MC/COFF/weak-symbol-section-specification.ll
new file mode 100644
index 0000000000..5049372959
--- /dev/null
+++ b/test/MC/COFF/weak-symbol-section-specification.ll
@@ -0,0 +1,23 @@
+; The purpose of this test is to verify that weak linkage type is not ignored by backend,
+; if section was specialized.
+
+; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s
+
+@a = weak unnamed_addr constant { i32, i32, i32 } { i32 0, i32 0, i32 0}, section ".data"
+
+; CHECK: Name = .data$a
+; CHECK-NEXT: VirtualSize = 0
+; CHECK-NEXT: VirtualAddress = 0
+; CHECK-NEXT: SizeOfRawData = {{[0-9]+}}
+; CHECK-NEXT: PointerToRawData = 0x{{[0-9A-F]+}}
+; CHECK-NEXT: PointerToRelocations = 0x0
+; CHECK-NEXT: PointerToLineNumbers = 0x0
+; CHECK-NEXT: NumberOfRelocations = 0
+; CHECK-NEXT: NumberOfLineNumbers = 0
+; CHECK-NEXT: Charateristics = 0x40401040
+; CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
+; CHECK-NEXT: IMAGE_SCN_LNK_COMDAT
+; CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
+; CHECK-NEXT: IMAGE_SCN_MEM_READ
+; CHECK-NEXT: SectionData =
+; CHECK-NEXT: 00 00 00 00 00 00 00 00 - 00 00 00 00