1 // This test checks that the COFF object emitter works for the most basic
4 // RUN
: llvm-mc
-filetype
=obj
-triple i686-pc-win32
%s | coff-dump.py | FileCheck
%s
5 // I WOULD RUN
, BUT THIS FAILS
: llvm-mc
-filetype
=obj
-triple x86_64-pc-win32
%s
28 // CHECK
: MachineType
= IMAGE_FILE_MACHINE_I386
(0x14C)
29 // CHECK
: NumberOfSections
= 2
30 // CHECK
: TimeDateStamp
= {{[0-9]+}}
31 // CHECK
: PointerToSymbolTable
= 0x
{{[0-9A-F
]+}}
32 // CHECK
: NumberOfSymbols
= 6
33 // CHECK
: SizeOfOptionalHeader
= 0
34 // CHECK
: Characteristics
= 0x0
35 // CHECK
: Sections
= [
37 // CHECK
: Name
= .text
38 // CHECK
: VirtualSize
= 0
39 // CHECK
: VirtualAddress
= 0
40 // CHECK
: SizeOfRawData
= {{[0-9]+}}
41 // CHECK
: PointerToRawData
= 0x
{{[0-9A-F
]+}}
42 // CHECK
: PointerToRelocations
= 0x
{{[0-9A-F
]+}}
43 // CHECK
: PointerToLineNumbers
= 0x0
44 // CHECK
: NumberOfRelocations
= 2
45 // CHECK
: NumberOfLineNumbers
= 0
46 // CHECK
: Charateristics
= 0x60500020
47 // CHECK
: IMAGE_SCN_CNT_CODE
48 // CHECK
: IMAGE_SCN_ALIGN_16BYTES
49 // CHECK
: IMAGE_SCN_MEM_EXECUTE
50 // CHECK
: IMAGE_SCN_MEM_READ
51 // CHECK
: SectionData
=
52 // CHECK
: Relocations
= [
54 // CHECK
: VirtualAddress
= 0x
{{[0-9A-F
]+}}
55 // CHECK
: SymbolTableIndex
= 2
56 // CHECK
: Type
= IMAGE_REL_I386_DIR32
(6)
57 // CHECK
: SymbolName
= .data
60 // CHECK
: VirtualAddress
= 0x
{{[0-9A-F
]+}}
61 // CHECK
: SymbolTableIndex
= 5
62 // CHECK
: Type
= IMAGE_REL_I386_REL32
(20)
63 // CHECK
: SymbolName
= _printf
68 // CHECK
: Name
= .data
69 // CHECK
: VirtualSize
= 0
70 // CHECK
: VirtualAddress
= 0
71 // CHECK
: SizeOfRawData
= {{[0-9]+}}
72 // CHECK
: PointerToRawData
= 0x
{{[0-9A-F
]+}}
73 // CHECK
: PointerToRelocations
= 0x0
74 // CHECK
: PointerToLineNumbers
= 0x0
75 // CHECK
: NumberOfRelocations
= 0
76 // CHECK
: NumberOfLineNumbers
= 0
77 // CHECK
: Charateristics
= 0xC0300040
78 // CHECK
: IMAGE_SCN_CNT_INITIALIZED_DATA
79 // CHECK
: IMAGE_SCN_ALIGN_4BYTES
80 // CHECK
: IMAGE_SCN_MEM_READ
81 // CHECK
: IMAGE_SCN_MEM_WRITE
82 // CHECK
: SectionData
=
83 // CHECK
: 48 65 6C
6C
6F
20 57 6F
- 72 6C
64 00 |Hello World.|
84 // CHECK
: Relocations
= None
89 // CHECK
: Name
= .text
91 // CHECK
: SectionNumber
= 1
92 // CHECK
: SimpleType
= IMAGE_SYM_TYPE_NULL
(0)
93 // CHECK
: ComplexType
= IMAGE_SYM_DTYPE_NULL
(0)
94 // CHECK
: StorageClass
= IMAGE_SYM_CLASS_STATIC
(3)
95 // CHECK
: NumberOfAuxSymbols
= 1
96 // CHECK
: AuxillaryData
=
97 // CHECK
: 18 00 00 00 02 00 00 00 - 00 00 00 00 01 00 00 00 |
................|
101 // CHECK
: Name
= .data
103 // CHECK
: SectionNumber
= 2
104 // CHECK
: SimpleType
= IMAGE_SYM_TYPE_NULL
(0)
105 // CHECK
: ComplexType
= IMAGE_SYM_DTYPE_NULL
(0)
106 // CHECK
: StorageClass
= IMAGE_SYM_CLASS_STATIC
(3)
107 // CHECK
: NumberOfAuxSymbols
= 1
108 // CHECK
: AuxillaryData
=
109 // CHECK
: 0C
00 00 00 00 00 00 00 - 00 00 00 00 02 00 00 00 |
................|
113 // CHECK
: Name
= _main
115 // CHECK
: SectionNumber
= 1
116 // CHECK
: SimpleType
= IMAGE_SYM_TYPE_NULL
(0)
117 // CHECK
: ComplexType
= IMAGE_SYM_DTYPE_FUNCTION
(2)
118 // CHECK
: StorageClass
= IMAGE_SYM_CLASS_EXTERNAL
(2)
119 // CHECK
: NumberOfAuxSymbols
= 0
120 // CHECK
: AuxillaryData
=
123 // CHECK
: Name
= _printf
125 // CHECK
: SectionNumber
= 0
126 // CHECK
: SimpleType
= IMAGE_SYM_TYPE_NULL
(0)
127 // CHECK
: ComplexType
= IMAGE_SYM_DTYPE_NULL
(0)
128 // CHECK
: StorageClass
= IMAGE_SYM_CLASS_EXTERNAL
(2)
129 // CHECK
: NumberOfAuxSymbols
= 0
130 // CHECK
: AuxillaryData
=