Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / test / Object / obj2yaml.test
blob79f44a02b943cc0382516ff8c670fedaafbbacc3
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
3 RUN: obj2yaml %p/Inputs/trivial-object-test.coff-armnt | FileCheck %s --check-prefix COFF-ARMNT
4 RUN: obj2yaml %p/Inputs/trivial-object-test.coff-arm64 | FileCheck %s --check-prefix COFF-ARM64
5 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-mipsel | FileCheck %s --check-prefix ELF-MIPSEL
6 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-mips64el | FileCheck %s --check-prefix ELF-MIPS64EL
7 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-x86-64 | FileCheck %s --check-prefix ELF-X86-64
8 RUN: obj2yaml %p/Inputs/trivial-object-test.elf-avr | FileCheck %s --check-prefix ELF-AVR
9 RUN: obj2yaml %p/Inputs/trivial-object-test.wasm | FileCheck %s --check-prefix WASM
10 RUN: obj2yaml %p/Inputs/unwind-section.elf-x86-64 | FileCheck %s --check-prefix ELF-X86-64-UNWIND
12 COFF-I386: header:
13 COFF-I386-NEXT:  Machine: IMAGE_FILE_MACHINE_I386
15 COFF-I386: sections:
16 COFF-I386-NEXT:  - Name: .text
17 COFF-I386-NEXT:    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
18 COFF-I386-NEXT:    Alignment: 16
19 COFF-I386-NEXT:    SectionData:  83EC0CC744240800000000C7042400000000E800000000E8000000008B44240883C40CC3
21 COFF-I386:    Relocations:
22 COFF-I386-NEXT:      - VirtualAddress: 14
23 COFF-I386-NEXT:        SymbolName: L_.str
24 COFF-I386-NEXT:        Type: IMAGE_REL_I386_DIR32
26 COFF-I386:           - VirtualAddress: 19
27 COFF-I386-NEXT:        SymbolName: _puts
28 COFF-I386-NEXT:        Type: IMAGE_REL_I386_REL32
30 COFF-I386:           - VirtualAddress: 24
31 COFF-I386-NEXT:        SymbolName: _SomeOtherFunction
32 COFF-I386-NEXT:        Type: IMAGE_REL_I386_REL32
34 COFF-I386:       - Name: .data
35 COFF-I386-NEXT:    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
36 COFF-I386-NEXT:    Alignment: 1
37 COFF-I386-NEXT:    SectionData: 48656C6C6F20576F726C642100
39 COFF-I386: symbols:
40 COFF-I386-NEXT:  - Name: .text
41 COFF-I386-NEXT:    Value: 0
42 COFF-I386-NEXT:    SectionNumber: 1
43 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
44 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
45 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
46 COFF-I386-NEXT:    SectionDefinition:
47 COFF-I386-NEXT:      Length:          36
48 COFF-I386-NEXT:      NumberOfRelocations: 3
49 COFF-I386-NEXT:      NumberOfLinenumbers: 0
50 COFF-I386-NEXT:      CheckSum:        0
51 COFF-I386-NEXT:      Number:          1
53 COFF-I386:       - Name: .data
54 COFF-I386-NEXT:    Value: 0
55 COFF-I386-NEXT:    SectionNumber: 2
56 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
57 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
58 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
59 COFF-I386-NEXT:    SectionDefinition:
60 COFF-I386-NEXT:      Length:          13
61 COFF-I386-NEXT:      NumberOfRelocations: 0
62 COFF-I386-NEXT:      NumberOfLinenumbers: 0
63 COFF-I386-NEXT:      CheckSum:        0
64 COFF-I386-NEXT:      Number:          2
66 COFF-I386:       - Name: _main
67 COFF-I386-NEXT:    Value: 0
68 COFF-I386-NEXT:    SectionNumber: 1
69 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
70 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_FUNCTION
71 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
73 COFF-I386:       - Name: L_.str
74 COFF-I386-NEXT:    Value: 0
75 COFF-I386-NEXT:    SectionNumber: 2
76 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
77 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
78 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
80 COFF-I386:       - Name: _puts
81 COFF-I386-NEXT:    Value: 0
82 COFF-I386-NEXT:    SectionNumber: 0
83 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
84 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
85 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
87 COFF-I386:       - Name: _SomeOtherFunction
88 COFF-I386-NEXT:    Value: 0
89 COFF-I386-NEXT:    SectionNumber: 0
90 COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
91 COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
92 COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
95 COFF-X86-64: header:
96 COFF-X86-64-NEXT:  Machine: IMAGE_FILE_MACHINE_AMD64
98 COFF-X86-64: sections:
99 COFF-X86-64-NEXT:   - Name: .text
100 COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
101 COFF-X86-64-NEXT:     Alignment: 16
102 COFF-X86-64-NEXT:     SectionData: 4883EC28C744242400000000488D0D00000000E800000000E8000000008B4424244883C428C3
104 COFF-X86-64:     Relocations:
105 COFF-X86-64-NEXT:       - VirtualAddress: 15
106 COFF-X86-64-NEXT:         SymbolName: L.str
107 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
109 COFF-X86-64:            - VirtualAddress: 20
110 COFF-X86-64-NEXT:         SymbolName: puts
111 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
113 COFF-X86-64:            - VirtualAddress: 25
114 COFF-X86-64-NEXT:         SymbolName: SomeOtherFunction
115 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
117 COFF-X86-64:        - Name: .data
118 COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
119 COFF-X86-64-NEXT:     Alignment: 1
120 COFF-X86-64-NEXT:     SectionData: 48656C6C6F20576F726C642100
122 COFF-X86-64:        - Name: '.CRT$XCU'
123 COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
124 COFF-X86-64-NEXT:     Alignment: 8
125 COFF-X86-64-NEXT:     SectionData:  '0000000000000000'
127 COFF-X86-64:     Relocations:
128 COFF-X86-64-NEXT:       - VirtualAddress: 0
129 COFF-X86-64-NEXT:         SymbolName: '??__Ex@@YAXXZ'
130 COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_ADDR64
132 COFF-X86-64: symbols:
133 COFF-X86-64-NEXT:   - Name: .text
134 COFF-X86-64-NEXT:     Value: 0
135 COFF-X86-64-NEXT:     SectionNumber: 1
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
139 COFF-X86-64-NEXT:    SectionDefinition:
140 COFF-X86-64-NEXT:      Length:          38
141 COFF-X86-64-NEXT:      NumberOfRelocations: 3
142 COFF-X86-64-NEXT:      NumberOfLinenumbers: 0
143 COFF-X86-64-NEXT:      CheckSum:        0
144 COFF-X86-64-NEXT:      Number:          1
146 COFF-X86-64:        - Name: .data
147 COFF-X86-64-NEXT:     Value: 0
148 COFF-X86-64-NEXT:     SectionNumber: 2
149 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
150 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
151 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
152 COFF-X86-64-NEXT:    SectionDefinition:
153 COFF-X86-64-NEXT:      Length:          13
154 COFF-X86-64-NEXT:      NumberOfRelocations: 0
155 COFF-X86-64-NEXT:      NumberOfLinenumbers: 0
156 COFF-X86-64-NEXT:      CheckSum:        0
157 COFF-X86-64-NEXT:      Number:          2
159 COFF-X86-64:        - Name: main
160 COFF-X86-64-NEXT:     Value: 0
161 COFF-X86-64-NEXT:     SectionNumber: 1
162 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
163 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_FUNCTION
164 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
166 COFF-X86-64:        - Name: L.str
167 COFF-X86-64-NEXT:     Value: 0
168 COFF-X86-64-NEXT:     SectionNumber: 2
169 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
170 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
171 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
173 COFF-X86-64:        - Name: puts
174 COFF-X86-64-NEXT:     Value: 0
175 COFF-X86-64-NEXT:     SectionNumber: 0
176 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
177 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
178 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
180 COFF-X86-64:        - Name: SomeOtherFunction
181 COFF-X86-64-NEXT:     Value: 0
182 COFF-X86-64-NEXT:     SectionNumber: 0
183 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
184 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
185 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
187 COFF-X86-64:        - Name: '??__Ex@@YAXXZ'
188 COFF-X86-64-NEXT:     Value: 0
189 COFF-X86-64-NEXT:     SectionNumber: 3
190 COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
191 COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_FUNCTION
192 COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
194 COFF-ARMNT: header:
195 COFF-ARMNT-NEXT:  Machine: IMAGE_FILE_MACHINE_ARMNT
197 COFF-ARMNT: sections:
198 COFF-ARMNT-NEXT:   - Name: .text
199 COFF-ARMNT-NEXT:     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_16BIT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
200 COFF-ARMNT-NEXT:     Alignment: 4
201 COFF-ARMNT-NEXT:     SectionData: 00F000F87047
203 COFF-ARMNT:     Relocations:
204 COFF-ARMNT-NEXT:       - VirtualAddress: 0
205 COFF-ARMNT-NEXT:         SymbolName: otherFunc
206 COFF-ARMNT-NEXT:         Type: IMAGE_REL_ARM_BLX23T
208 COFF-ARMNT:        - Name: .data
209 COFF-ARMNT-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
210 COFF-ARMNT-NEXT:     Alignment: 4
211 COFF-ARMNT-NEXT:     SectionData: ''
213 COFF-ARMNT:        - Name: .bss
214 COFF-ARMNT-NEXT:     Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
215 COFF-ARMNT-NEXT:     Alignment: 4
216 COFF-ARMNT-NEXT:     SectionData: ''
218 COFF-ARMNT: symbols:
219 COFF-ARMNT-NEXT:   - Name: .text
220 COFF-ARMNT-NEXT:     Value: 0
221 COFF-ARMNT-NEXT:     SectionNumber: 1
222 COFF-ARMNT-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
223 COFF-ARMNT-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
224 COFF-ARMNT-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
225 COFF-ARMNT-NEXT:     SectionDefinition:
226 COFF-ARMNT-NEXT:       Length:          6
227 COFF-ARMNT-NEXT:       NumberOfRelocations: 1
228 COFF-ARMNT-NEXT:       NumberOfLinenumbers: 0
229 COFF-ARMNT-NEXT:       CheckSum:        879026160
230 COFF-ARMNT-NEXT:       Number:          1
232 COFF-ARMNT:        - Name: .data
233 COFF-ARMNT-NEXT:     Value: 0
234 COFF-ARMNT-NEXT:     SectionNumber: 2
235 COFF-ARMNT-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
236 COFF-ARMNT-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
237 COFF-ARMNT-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
238 COFF-ARMNT-NEXT:     SectionDefinition:
239 COFF-ARMNT-NEXT:       Length:          0
240 COFF-ARMNT-NEXT:       NumberOfRelocations: 0
241 COFF-ARMNT-NEXT:       NumberOfLinenumbers: 0
242 COFF-ARMNT-NEXT:       CheckSum:        0
243 COFF-ARMNT-NEXT:       Number:          2
245 COFF-ARMNT:        - Name: .bss
246 COFF-ARMNT-NEXT:     Value: 0
247 COFF-ARMNT-NEXT:     SectionNumber: 3
248 COFF-ARMNT-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
249 COFF-ARMNT-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
250 COFF-ARMNT-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
251 COFF-ARMNT-NEXT:     SectionDefinition:
252 COFF-ARMNT-NEXT:       Length:          0
253 COFF-ARMNT-NEXT:       NumberOfRelocations: 0
254 COFF-ARMNT-NEXT:       NumberOfLinenumbers: 0
255 COFF-ARMNT-NEXT:       CheckSum:        0
256 COFF-ARMNT-NEXT:       Number:          3
258 COFF-ARMNT:        - Name: main
259 COFF-ARMNT-NEXT:     Value: 0
260 COFF-ARMNT-NEXT:     SectionNumber: 1
261 COFF-ARMNT-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
262 COFF-ARMNT-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
263 COFF-ARMNT-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
265 COFF-ARMNT:        - Name: otherFunc
266 COFF-ARMNT-NEXT:     Value: 0
267 COFF-ARMNT-NEXT:     SectionNumber: 0
268 COFF-ARMNT-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
269 COFF-ARMNT-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
270 COFF-ARMNT-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
272 COFF-ARM64: header:
273 COFF-ARM64-NEXT:  Machine: IMAGE_FILE_MACHINE_ARM64
275 COFF-ARM64: sections:
276 COFF-ARM64-NEXT:   - Name: .text
277 COFF-ARM64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
278 COFF-ARM64-NEXT:     Alignment: 4
279 COFF-ARM64-NEXT:     SectionData: 00000094C0035FD6
281 COFF-ARM64:     Relocations:
282 COFF-ARM64-NEXT:       - VirtualAddress: 0
283 COFF-ARM64-NEXT:         SymbolName: otherFunc
284 COFF-ARM64-NEXT:         Type: IMAGE_REL_ARM64_BRANCH26
286 COFF-ARM64:        - Name: .data
287 COFF-ARM64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
288 COFF-ARM64-NEXT:     Alignment: 4
289 COFF-ARM64-NEXT:     SectionData: ''
291 COFF-ARM64:        - Name: .bss
292 COFF-ARM64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
293 COFF-ARM64-NEXT:     Alignment: 4
294 COFF-ARM64-NEXT:     SectionData: ''
296 COFF-ARM64: symbols:
297 COFF-ARM64-NEXT:   - Name: .text
298 COFF-ARM64-NEXT:     Value: 0
299 COFF-ARM64-NEXT:     SectionNumber: 1
300 COFF-ARM64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
301 COFF-ARM64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
302 COFF-ARM64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
303 COFF-ARM64-NEXT:     SectionDefinition:
304 COFF-ARM64-NEXT:       Length:          8
305 COFF-ARM64-NEXT:       NumberOfRelocations: 1
306 COFF-ARM64-NEXT:       NumberOfLinenumbers: 0
307 COFF-ARM64-NEXT:       CheckSum:        35579893
308 COFF-ARM64-NEXT:       Number:          1
310 COFF-ARM64:        - Name: .data
311 COFF-ARM64-NEXT:     Value: 0
312 COFF-ARM64-NEXT:     SectionNumber: 2
313 COFF-ARM64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
314 COFF-ARM64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
315 COFF-ARM64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
316 COFF-ARM64-NEXT:     SectionDefinition:
317 COFF-ARM64-NEXT:       Length:          0
318 COFF-ARM64-NEXT:       NumberOfRelocations: 0
319 COFF-ARM64-NEXT:       NumberOfLinenumbers: 0
320 COFF-ARM64-NEXT:       CheckSum:        0
321 COFF-ARM64-NEXT:       Number:          2
323 COFF-ARM64:        - Name: .bss
324 COFF-ARM64-NEXT:     Value: 0
325 COFF-ARM64-NEXT:     SectionNumber: 3
326 COFF-ARM64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
327 COFF-ARM64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
328 COFF-ARM64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
329 COFF-ARM64-NEXT:     SectionDefinition:
330 COFF-ARM64-NEXT:       Length:          0
331 COFF-ARM64-NEXT:       NumberOfRelocations: 0
332 COFF-ARM64-NEXT:       NumberOfLinenumbers: 0
333 COFF-ARM64-NEXT:       CheckSum:        0
334 COFF-ARM64-NEXT:       Number:          3
336 COFF-ARM64:        - Name: main
337 COFF-ARM64-NEXT:     Value: 0
338 COFF-ARM64-NEXT:     SectionNumber: 1
339 COFF-ARM64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
340 COFF-ARM64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
341 COFF-ARM64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
343 COFF-ARM64:        - Name: otherFunc
344 COFF-ARM64-NEXT:     Value: 0
345 COFF-ARM64-NEXT:     SectionNumber: 0
346 COFF-ARM64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
347 COFF-ARM64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
348 COFF-ARM64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
350 ELF-MIPSEL:      FileHeader:
351 ELF-MIPSEL-NEXT:   Class:           ELFCLASS32
352 ELF-MIPSEL-NEXT:   Data:            ELFDATA2LSB
353 ELF-MIPSEL-NEXT:   OSABI:           ELFOSABI_GNU
354 ELF-MIPSEL-NEXT:   Type:            ET_REL
355 ELF-MIPSEL-NEXT:   Machine:         EM_MIPS
356 ELF-MIPSEL-NEXT:   Flags:           [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
357 ELF-MIPSEL-NEXT: Sections:
358 ELF-MIPSEL-NEXT:   - Name:            .text
359 ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
360 ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
361 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
362 ELF-MIPSEL-NEXT:     Content:         0000023C00004224E8FFBD271400BFAF1000B0AF218059000000018E000024240000198E09F8200321E000020000198E09F8200321E00002000002241000B08F1400BF8F0800E0031800BD27
363 ELF-MIPSEL-NEXT:   - Name:            .rel.text
364 ELF-MIPSEL-NEXT:     Type:            SHT_REL
365 ELF-MIPSEL-NEXT:     Link:            .symtab
366 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
367 ELF-MIPSEL-NEXT:     EntSize:         0x0000000000000008
368 ELF-MIPSEL-NEXT:     Info:            .text
369 ELF-MIPSEL-NEXT:     Relocations:
370 ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000000
371 ELF-MIPSEL-NEXT:         Symbol:          _gp_disp
372 ELF-MIPSEL-NEXT:         Type:            R_MIPS_HI16
373 ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000004
374 ELF-MIPSEL-NEXT:         Symbol:          _gp_disp
375 ELF-MIPSEL-NEXT:         Type:            R_MIPS_LO16
376 ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000018
377 ELF-MIPSEL-NEXT:         Symbol:          '$.str'
378 ELF-MIPSEL-NEXT:         Type:            R_MIPS_GOT16
379 ELF-MIPSEL-NEXT:       - Offset:          0x000000000000001C
380 ELF-MIPSEL-NEXT:         Symbol:          '$.str'
381 ELF-MIPSEL-NEXT:         Type:            R_MIPS_LO16
382 ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000020
383 ELF-MIPSEL-NEXT:         Symbol:          puts
384 ELF-MIPSEL-NEXT:         Type:            R_MIPS_CALL16
385 ELF-MIPSEL-NEXT:       - Offset:          0x000000000000002C
386 ELF-MIPSEL-NEXT:         Symbol:          SomeOtherFunction
387 ELF-MIPSEL-NEXT:         Type:            R_MIPS_CALL16
388 ELF-MIPSEL-NEXT:   - Name:            .data
389 ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
390 ELF-MIPSEL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
391 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
392 ELF-MIPSEL-NEXT:     Content:         ''
393 ELF-MIPSEL-NEXT:   - Name:            .bss
394 ELF-MIPSEL-NEXT:     Type:            SHT_NOBITS
395 ELF-MIPSEL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
396 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
397 ELF-MIPSEL-NEXT:     Size:            0x0000000000000004
398 ELF-MIPSEL-NEXT:   - Name:            .mdebug.abi32
399 ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
400 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000001
401 ELF-MIPSEL-NEXT:     Content:         ''
402 ELF-MIPSEL-NEXT:   - Name:            .rodata.str1.1
403 ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
404 ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC, SHF_MERGE, SHF_STRINGS ]
405 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000001
406 ELF-MIPSEL-NEXT:     EntSize:         0x0000000000000001
407 ELF-MIPSEL-NEXT:     Content:         48656C6C6F20576F726C640A00
408 ELF-MIPSEL-NEXT:   - Name:            .reginfo
409 ELF-MIPSEL-NEXT:     Type:            SHT_MIPS_REGINFO
410 ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC ]
411 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000001
412 ELF-MIPSEL-NEXT:     Content:         '000000000000000000000000000000000000000000000000'
413 ELF-MIPSEL-NEXT:   - Name:            .MIPS.abiflags
414 ELF-MIPSEL-NEXT:     Type:            SHT_MIPS_ABIFLAGS
415 ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC ]
416 ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000008
417 ELF-MIPSEL-NEXT:     ISA:             MIPS32
418 ELF-MIPSEL-NEXT:     ISARevision:     0x01
419 ELF-MIPSEL-NEXT:     FpABI:           FP_DOUBLE
420 ELF-MIPSEL-NEXT:     GPRSize:         REG_32
421 ELF-MIPSEL-NEXT:     CPR1Size:        REG_32
422 ELF-MIPSEL-NEXT:     Flags1:          [ ODDSPREG ]
423 ELF-MIPSEL-NEXT: Symbols:
424 ELF-MIPSEL-NEXT:   Local:
425 ELF-MIPSEL-NEXT:     - Name:            trivial.ll
426 ELF-MIPSEL-NEXT:       Type:            STT_FILE
427 ELF-MIPSEL-NEXT:     - Name:            '$.str'
428 ELF-MIPSEL-NEXT:       Type:            STT_OBJECT
429 ELF-MIPSEL-NEXT:       Section:         .rodata.str1.1
430 ELF-MIPSEL-NEXT:       Size:            0x000000000000000D
431 ELF-MIPSEL-NEXT:     - Name:            .text
432 ELF-MIPSEL-NEXT:       Type:            STT_SECTION
433 ELF-MIPSEL-NEXT:       Section:         .text
434 ELF-MIPSEL-NEXT:     - Name:            .data
435 ELF-MIPSEL-NEXT:       Type:            STT_SECTION
436 ELF-MIPSEL-NEXT:       Section:         .data
437 ELF-MIPSEL-NEXT:     - Name:            .bss
438 ELF-MIPSEL-NEXT:       Type:            STT_SECTION
439 ELF-MIPSEL-NEXT:       Section:         .bss
440 ELF-MIPSEL-NEXT:     - Name:            .mdebug.abi32
441 ELF-MIPSEL-NEXT:       Type:            STT_SECTION
442 ELF-MIPSEL-NEXT:       Section:         .mdebug.abi32
443 ELF-MIPSEL-NEXT:     - Name:            .rodata.str1.1
444 ELF-MIPSEL-NEXT:       Type:            STT_SECTION
445 ELF-MIPSEL-NEXT:       Section:         .rodata.str1.1
446 ELF-MIPSEL-NEXT:     - Name:            .reginfo
447 ELF-MIPSEL-NEXT:       Type:            STT_SECTION
448 ELF-MIPSEL-NEXT:       Section:         .reginfo
449 ELF-MIPSEL-NEXT:     - Name:            .MIPS.abiflags
450 ELF-MIPSEL-NEXT:       Type:            STT_SECTION
451 ELF-MIPSEL-NEXT:       Section:         .MIPS.abiflags
452 ELF-MIPSEL-NEXT:   Global:
453 ELF-MIPSEL-NEXT:     - Name:            main
454 ELF-MIPSEL-NEXT:       Type:            STT_FUNC
455 ELF-MIPSEL-NEXT:       Section:         .text
456 ELF-MIPSEL-NEXT:       Size:            0x000000000000004C
457 ELF-MIPSEL-NEXT:     - Name:            var
458 ELF-MIPSEL-NEXT:       Type:            STT_OBJECT
459 ELF-MIPSEL-NEXT:       Section:         .bss
460 ELF-MIPSEL-NEXT:       Size:            0x0000000000000004
461 ELF-MIPSEL-NEXT:     - Name:            SomeOtherFunction
462 ELF-MIPSEL-NEXT:     - Name:            _gp_disp
463 ELF-MIPSEL-NEXT:     - Name:            puts
465 ELF-MIPS64EL:      FileHeader:
466 ELF-MIPS64EL-NEXT:   Class:           ELFCLASS64
467 ELF-MIPS64EL-NEXT:   Data:            ELFDATA2LSB
468 ELF-MIPS64EL-NEXT:   Type:            ET_REL
469 ELF-MIPS64EL-NEXT:   Machine:         EM_MIPS
470 ELF-MIPS64EL-NEXT:   Flags:           [ EF_MIPS_ARCH_3 ]
471 ELF-MIPS64EL-NEXT: Sections:
472 ELF-MIPS64EL-NEXT:   - Name:            .text
473 ELF-MIPS64EL-NEXT:     Type:            SHT_PROGBITS
474 ELF-MIPS64EL-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
475 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000010
476 ELF-MIPS64EL-NEXT:     Content:         ''
477 ELF-MIPS64EL-NEXT:   - Name:            .data
478 ELF-MIPS64EL-NEXT:     Type:            SHT_PROGBITS
479 ELF-MIPS64EL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
480 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000010
481 ELF-MIPS64EL-NEXT:     Content:         '00000000000000000000000000000000'
482 ELF-MIPS64EL-NEXT:   - Name:            .rela.data
483 ELF-MIPS64EL-NEXT:     Type:            SHT_RELA
484 ELF-MIPS64EL-NEXT:     Link:            .symtab
485 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000008
486 ELF-MIPS64EL-NEXT:     EntSize:         0x0000000000000018
487 ELF-MIPS64EL-NEXT:     Info:            .data
488 ELF-MIPS64EL-NEXT:     Relocations:
489 ELF-MIPS64EL-NEXT:       - Offset:          0
490 ELF-MIPS64EL-NEXT:         Symbol:          zed
491 ELF-MIPS64EL-NEXT:         Type:            R_MIPS_64
492 ELF-MIPS64EL-NEXT:   - Name:            .bss
493 ELF-MIPS64EL-NEXT:     Type:            SHT_NOBITS
494 ELF-MIPS64EL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
495 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000010
496 ELF-MIPS64EL-NEXT:   - Name:            .MIPS.options
497 ELF-MIPS64EL-NEXT:     Type:            SHT_MIPS_OPTIONS
498 ELF-MIPS64EL-NEXT:     Flags:           [ SHF_ALLOC, SHF_MIPS_NOSTRIP ]
499 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000008
500 ELF-MIPS64EL-NEXT:     EntSize:         0x0000000000000001
501 ELF-MIPS64EL-NEXT:     Content:         '01280000000000000000000000000000000000000000000000000000000000000000000000000000'
502 ELF-MIPS64EL-NEXT:   - Name:            .pdr
503 ELF-MIPS64EL-NEXT:     Type:            SHT_PROGBITS
504 ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000004
505 ELF-MIPS64EL-NEXT:     Content:         ''
506 ELF-MIPS64EL-NEXT: Symbols:
507 ELF-MIPS64EL-NEXT:   Local:
508 ELF-MIPS64EL-NEXT:     - Name:            .text
509 ELF-MIPS64EL-NEXT:       Type:            STT_SECTION
510 ELF-MIPS64EL-NEXT:       Section:         .text
511 ELF-MIPS64EL-NEXT:     - Name:            .data
512 ELF-MIPS64EL-NEXT:       Type:            STT_SECTION
513 ELF-MIPS64EL-NEXT:       Section:         .data
514 ELF-MIPS64EL-NEXT:     - Name:            .bss
515 ELF-MIPS64EL-NEXT:       Type:            STT_SECTION
516 ELF-MIPS64EL-NEXT:       Section:         .bss
517 ELF-MIPS64EL-NEXT:     - Name:            bar
518 ELF-MIPS64EL-NEXT:       Section:         .data
519 ELF-MIPS64EL-NEXT:     - Name:            .MIPS.options
520 ELF-MIPS64EL-NEXT:       Type:            STT_SECTION
521 ELF-MIPS64EL-NEXT:       Section:         .MIPS.options
522 ELF-MIPS64EL-NEXT:     - Name:            .pdr
523 ELF-MIPS64EL-NEXT:       Type:            STT_SECTION
524 ELF-MIPS64EL-NEXT:       Section:         .pdr
525 ELF-MIPS64EL-NEXT:   Global:
526 ELF-MIPS64EL-NEXT:     - Name:            zed
528 ELF-X86-64:      FileHeader:
529 ELF-X86-64-NEXT:   Class:           ELFCLASS64
530 ELF-X86-64-NEXT:   Data:            ELFDATA2LSB
531 ELF-X86-64-NEXT:   OSABI:           ELFOSABI_GNU
532 ELF-X86-64-NEXT:   Type:            ET_REL
533 ELF-X86-64-NEXT:   Machine:         EM_X86_64
534 ELF-X86-64-NEXT: Sections:
535 ELF-X86-64-NEXT:   - Name:            .text
536 ELF-X86-64-NEXT:     Type:            SHT_PROGBITS
537 ELF-X86-64-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
538 ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000010
539 ELF-X86-64-NEXT:     Content:         4883EC08C744240400000000BF00000000E80000000030C0E8000000008B4424044883C408C3
540 ELF-X86-64-NEXT:   - Name:            .rodata.str1.1
541 ELF-X86-64-NEXT:     Type:            SHT_PROGBITS
542 ELF-X86-64-NEXT:     Flags:           [ SHF_ALLOC, SHF_MERGE, SHF_STRINGS ]
543 ELF-X86-64-NEXT:     Address:         0x0000000000000026
544 ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000001
545 ELF-X86-64-NEXT:     Content:         48656C6C6F20576F726C642100
546 ELF-X86-64-NEXT:   - Name:            .note.GNU-stack
547 ELF-X86-64-NEXT:     Type:            SHT_PROGBITS
548 ELF-X86-64-NEXT:     Address:         0x0000000000000033
549 ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000001
550 ELF-X86-64-NEXT:     Content:         ''
551 ELF-X86-64-NEXT:   - Name:            .rela.text
552 ELF-X86-64-NEXT:     Type:            SHT_RELA
553 ELF-X86-64-NEXT:     Address:         0x0000000000000038
554 ELF-X86-64-NEXT:     Link:            .symtab
555 ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000008
556 ELF-X86-64-NEXT:     EntSize:         0x0000000000000018
557 ELF-X86-64-NEXT:     Info:            .text
558 ELF-X86-64-NEXT:     Relocations:
559 ELF-X86-64-NEXT:       - Offset:          0x000000000000000D
560 ELF-X86-64-NEXT:         Symbol:          .rodata.str1.1
561 ELF-X86-64-NEXT:         Type:            R_X86_64_32S
562 ELF-X86-64-NEXT:       - Offset:          0x0000000000000012
563 ELF-X86-64-NEXT:         Symbol:          puts
564 ELF-X86-64-NEXT:         Type:            R_X86_64_PC32
565 ELF-X86-64-NEXT:         Addend:          -4
566 ELF-X86-64-NEXT:       - Offset:          0x0000000000000019
567 ELF-X86-64-NEXT:         Symbol:          SomeOtherFunction
568 ELF-X86-64-NEXT:         Type:            R_X86_64_PC32
569 ELF-X86-64-NEXT:         Addend:          -4
570 ELF-X86-64-NEXT: Symbols:
571 ELF-X86-64-NEXT:   Local:
572 ELF-X86-64-NEXT:     - Name:            trivial-object-test.s
573 ELF-X86-64-NEXT:       Type:            STT_FILE
574 ELF-X86-64-NEXT:     - Name:            .text
575 ELF-X86-64-NEXT:       Type:            STT_SECTION
576 ELF-X86-64-NEXT:       Section:         .text
577 ELF-X86-64-NEXT:     - Name:            .rodata.str1.1
578 ELF-X86-64-NEXT:       Type:            STT_SECTION
579 ELF-X86-64-NEXT:       Section:         .rodata.str1.1
580 ELF-X86-64-NEXT:     - Name:            .note.GNU-stack
581 ELF-X86-64-NEXT:       Type:            STT_SECTION
582 ELF-X86-64-NEXT:       Section:         .note.GNU-stack
583 ELF-X86-64-NEXT:   Global:
584 ELF-X86-64-NEXT:     - Name:            main
585 ELF-X86-64-NEXT:       Type:            STT_FUNC
586 ELF-X86-64-NEXT:       Section:         .text
587 ELF-X86-64-NEXT:       Size:            0x0000000000000026
588 ELF-X86-64-NEXT:     - Name:            SomeOtherFunction
589 ELF-X86-64-NEXT:     - Name:            puts
592 ELF-AVR:      FileHeader:
593 ELF-AVR-NEXT:   Class:           ELFCLASS32
594 ELF-AVR-NEXT:   Data:            ELFDATA2LSB
595 ELF-AVR-NEXT:   Type:            ET_EXEC
596 ELF-AVR-NEXT:   Machine:         EM_AVR
597 ELF-AVR-NEXT:   Flags:           [ EF_AVR_ARCH_AVR2 ]
598 ELF-AVR-NEXT: Sections:
599 ELF-AVR-NEXT:   - Name:            .text
600 ELF-AVR-NEXT:     Type:            SHT_PROGBITS
601 ELF-AVR-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
602 ELF-AVR-NEXT:     AddressAlign:    0x0000000000000002
603 ELF-AVR-NEXT:     Content:         C20E0895
604 ELF-AVR-NEXT:   - Name:            .data
605 ELF-AVR-NEXT:     Type:            SHT_PROGBITS
606 ELF-AVR-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
607 ELF-AVR-NEXT:     Address:         0x0000000000800060
608 ELF-AVR-NEXT:     AddressAlign:    0x0000000000000001
609 ELF-AVR-NEXT:     Content:         ''
610 ELF-AVR-NEXT: Symbols:
611 ELF-AVR-NEXT:   Local:
612 ELF-AVR-NEXT:     - Name:           .text
613 ELF-AVR-NEXT:       Type:            STT_SECTION
614 ELF-AVR-NEXT:       Section:         .text
615 ELF-AVR-NEXT:     - Name:           .data
616 ELF-AVR-NEXT:       Type:            STT_SECTION
617 ELF-AVR-NEXT:       Section:         .data
618 ELF-AVR-NEXT:       Value:           0x0000000000800060
619 ELF-AVR-NEXT:     - Name:            a.o
620 ELF-AVR-NEXT:       Type:            STT_FILE
621 ELF-AVR-NEXT:     - Name:            main
622 ELF-AVR-NEXT:       Section:         .text
623 ELF-AVR-NEXT:   Global:
624 ELF-AVR-NEXT:     - Name:            __trampolines_start
625 ELF-AVR-NEXT:       Section:         .text
626 ELF-AVR-NEXT:     - Name:            _etext
627 ELF-AVR-NEXT:       Section:         .text
628 ELF-AVR-NEXT:       Value:           0x0000000000000004
629 ELF-AVR-NEXT:     - Name:            __data_load_end
630 ELF-AVR-NEXT:       Value:           0x0000000000000004
631 ELF-AVR-NEXT:     - Name:            __trampolines_end
632 ELF-AVR-NEXT:       Section:         .text
633 ELF-AVR-NEXT:     - Name:            __data_load_start
634 ELF-AVR-NEXT:       Value:           0x0000000000000004
635 ELF-AVR-NEXT:     - Name:            __dtors_end
636 ELF-AVR-NEXT:       Section:         .text
637 ELF-AVR-NEXT:     - Name:            __eeprom_end
638 ELF-AVR-NEXT:       Section:         .data
639 ELF-AVR-NEXT:       Value:           0x0000000000810000
640 ELF-AVR-NEXT:     - Name:            __ctors_start
641 ELF-AVR-NEXT:       Section:         .text
642 ELF-AVR-NEXT:     - Name:            __dtors_start
643 ELF-AVR-NEXT:       Section:         .text
644 ELF-AVR-NEXT:     - Name:            __ctors_end
645 ELF-AVR-NEXT:       Section:         .text
646 ELF-AVR-NEXT:     - Name:            _edata
647 ELF-AVR-NEXT:       Section:         .data
648 ELF-AVR-NEXT:       Value:           0x0000000000800060
649 ELF-AVR-NEXT:     - Name:            _end
650 ELF-AVR-NEXT:       Section:         .data
651 ELF-AVR-NEXT:       Value:           0x0000000000800060
654 WASM:      --- !WASM
655 WASM-NEXT: FileHeader:
656 WASM-NEXT:   Version:         0x00000001
657 WASM:        - Type:            CUSTOM
658 WASM-NEXT:     Name:            linking
659 WASM-NEXT:     Version:         2
660 WASM-NEXT:     SymbolTable:
661 WASM-NEXT:       - Index:           0
662 WASM-NEXT:         Kind:            FUNCTION
663 WASM-NEXT:         Name:            main
664 WASM-NEXT:         Flags:           [  ]
665 WASM-NEXT:         Function:        2
666 WASM-NEXT:       - Index:           1
667 WASM-NEXT:         Kind:            DATA
668 WASM-NEXT:         Name:            .L.str
669 WASM-NEXT:         Flags:           [ BINDING_LOCAL ]
670 WASM-NEXT:         Segment:         0
671 WASM-NEXT:         Size:            13
672 WASM-NEXT:       - Index:           2
673 WASM:              Name:            puts
674 WASM:            - Index:           3
675 WASM:              Name:            .LSomeOtherFunction_bitcast
676 WASM:            - Index:           4
677 WASM:              Name:            SomeOtherFunction
678 WASM:            - Index:           5
679 WASM:              Name:            var
680 WASM:          SegmentInfo:
681 WASM-NEXT:       - Index:           0
682 WASM-NEXT:         Name:            .rodata..L.str
683 WASM-NEXT:         Alignment:       0
684 WASM-NEXT:         Flags:           [  ]
685 WASM-NEXT:       - Index:           1
686 WASM:      ...
689 ELF-X86-64-UNWIND:      - Name:            .eh_frame
690 ELF-X86-64-UNWIND-NEXT:   Type:            SHT_X86_64_UNWIND
691 ELF-X86-64-UNWIND-NEXT:   Flags:           [ SHF_ALLOC ]
692 ELF-X86-64-UNWIND-NEXT:   AddressAlign:    0x0000000000000001
693 ELF-X86-64-UNWIND-NEXT:   Content:         ''
695 RUN: not obj2yaml %t.blah 2>&1 | FileCheck --check-prefix=ENOENT %s
696 ENOENT: Error reading file: {{.*}}.blah: {{[Nn]}}o such file or directory