1 RUN: obj2yaml %p/Inputs/trivial-object-test.coff-i386 | FileCheck %s --check-prefix COFF-I386
2 RUN: obj2yaml %p/Inputs/trivial-object-test.coff-x86-64 | FileCheck %s --check-prefix COFF-X86-64
6 COFF-I386-NEXT: Machine: IMAGE_FILE_MACHINE_I386
9 COFF-I386-NEXT: - Name: .text
10 COFF-I386-NEXT: Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
11 COFF-I386-NEXT: Alignment: 16
12 COFF-I386-NEXT: SectionData: 83EC0CC744240800000000C7042400000000E800000000E8000000008B44240883C40CC3
14 COFF-I386: Relocations:
15 COFF-I386-NEXT: - VirtualAddress: 14
16 COFF-I386-NEXT: SymbolTableIndex: 5
17 COFF-I386-NEXT: Type: IMAGE_REL_I386_DIR32
19 COFF-I386: - VirtualAddress: 19
20 COFF-I386-NEXT: SymbolTableIndex: 6
21 COFF-I386-NEXT: Type: IMAGE_REL_I386_REL32
23 COFF-I386: - VirtualAddress: 24
24 COFF-I386-NEXT: SymbolTableIndex: 7
25 COFF-I386-NEXT: Type: IMAGE_REL_I386_REL32
27 COFF-I386: - Name: .data
28 COFF-I386-NEXT: Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
29 COFF-I386-NEXT: Alignment: 1
30 COFF-I386-NEXT: SectionData: 48656C6C6F20576F726C642100
33 COFF-I386-NEXT: - Name: .text
34 COFF-I386-NEXT: Value: 0
35 COFF-I386-NEXT: SectionNumber: 1
36 COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
37 COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
38 COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
39 COFF-I386-NEXT: NumberOfAuxSymbols: 1
40 COFF-I386-NEXT: AuxiliaryData: 240000000300000000000000010000000000
42 COFF-I386: - Name: .data
43 COFF-I386-NEXT: Value: 0
44 COFF-I386-NEXT: SectionNumber: 2
45 COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
46 COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
47 COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
48 COFF-I386-NEXT: NumberOfAuxSymbols: 1
49 COFF-I386-NEXT: AuxiliaryData: 0D0000000000000000000000020000000000
51 COFF-I386: - Name: _main
52 COFF-I386-NEXT: Value: 0
53 COFF-I386-NEXT: SectionNumber: 1
54 COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
55 COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_FUNCTION
56 COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
58 COFF-I386: - Name: L_.str
59 COFF-I386-NEXT: Value: 0
60 COFF-I386-NEXT: SectionNumber: 2
61 COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
62 COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
63 COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
65 COFF-I386: - Name: _puts
66 COFF-I386-NEXT: Value: 0
67 COFF-I386-NEXT: SectionNumber: 0
68 COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
69 COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
70 COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
72 COFF-I386: - Name: _SomeOtherFunction
73 COFF-I386-NEXT: Value: 0
74 COFF-I386-NEXT: SectionNumber: 0
75 COFF-I386-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
76 COFF-I386-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
77 COFF-I386-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
81 COFF-X86-64-NEXT: Machine: IMAGE_FILE_MACHINE_AMD64
83 COFF-X86-64: sections:
84 COFF-X86-64-NEXT: - Name: .text
85 COFF-X86-64-NEXT: Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
86 COFF-X86-64-NEXT: Alignment: 16
87 COFF-X86-64-NEXT: SectionData: 4883EC28C744242400000000488D0D00000000E800000000E8000000008B4424244883C428C3
89 COFF-X86-64: Relocations:
90 COFF-X86-64-NEXT: - VirtualAddress: 15
91 COFF-X86-64-NEXT: SymbolTableIndex: 5
92 COFF-X86-64-NEXT: Type: IMAGE_REL_AMD64_REL32
94 COFF-X86-64: - VirtualAddress: 20
95 COFF-X86-64-NEXT: SymbolTableIndex: 6
96 COFF-X86-64-NEXT: Type: IMAGE_REL_AMD64_REL32
98 COFF-X86-64: - VirtualAddress: 25
99 COFF-X86-64-NEXT: SymbolTableIndex: 7
100 COFF-X86-64-NEXT: Type: IMAGE_REL_AMD64_REL32
102 COFF-X86-64: - Name: .data
103 COFF-X86-64-NEXT: Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
104 COFF-X86-64-NEXT: Alignment: 1
105 COFF-X86-64-NEXT: SectionData: 48656C6C6F20576F726C642100
107 COFF-X86-64: symbols:
108 COFF-X86-64-NEXT: - Name: .text
109 COFF-X86-64-NEXT: Value: 0
110 COFF-X86-64-NEXT: SectionNumber: 1
111 COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
112 COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
113 COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
114 COFF-X86-64-NEXT: NumberOfAuxSymbols: 1
115 COFF-X86-64-NEXT: AuxiliaryData: 260000000300000000000000010000000000
117 COFF-X86-64: - Name: .data
118 COFF-X86-64-NEXT: Value: 0
119 COFF-X86-64-NEXT: SectionNumber: 2
120 COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
121 COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
122 COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
123 COFF-X86-64-NEXT: NumberOfAuxSymbols: 1
124 COFF-X86-64-NEXT: AuxiliaryData: 0D0000000000000000000000020000000000
126 COFF-X86-64: - Name: main
127 COFF-X86-64-NEXT: Value: 0
128 COFF-X86-64-NEXT: SectionNumber: 1
129 COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
130 COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
131 COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
133 COFF-X86-64: - Name: L.str
134 COFF-X86-64-NEXT: Value: 0
135 COFF-X86-64-NEXT: SectionNumber: 2
136 COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
137 COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
138 COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_STATIC
140 COFF-X86-64: - Name: puts
141 COFF-X86-64-NEXT: Value: 0
142 COFF-X86-64-NEXT: SectionNumber: 0
143 COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
144 COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
145 COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL
147 COFF-X86-64: - Name: SomeOtherFunction
148 COFF-X86-64-NEXT: Value: 0
149 COFF-X86-64-NEXT: SectionNumber: 0
150 COFF-X86-64-NEXT: SimpleType: IMAGE_SYM_TYPE_NULL
151 COFF-X86-64-NEXT: ComplexType: IMAGE_SYM_DTYPE_NULL
152 COFF-X86-64-NEXT: StorageClass: IMAGE_SYM_CLASS_EXTERNAL