1RUN: obj2yaml %p/Inputs/trivial-object-test.coff-i386 | FileCheck %s --check-prefix COFF-I386
2RUN: obj2yaml %p/Inputs/trivial-object-test.coff-x86-64 | FileCheck %s --check-prefix COFF-X86-64
3RUN: obj2yaml %p/Inputs/trivial-object-test.elf-mipsel | FileCheck %s --check-prefix ELF-MIPSEL
4RUN: obj2yaml %p/Inputs/trivial-object-test.elf-mips64el | FileCheck %s --check-prefix ELF-MIPS64EL
5RUN: obj2yaml %p/Inputs/trivial-object-test.elf-x86-64 | FileCheck %s --check-prefix ELF-X86-64
6RUN: obj2yaml %p/Inputs/trivial-object-test.elf-avr | FileCheck %s --check-prefix ELF-AVR
7RUN: obj2yaml %p/Inputs/unwind-section.elf-x86-64 \
8RUN:   | FileCheck %s --check-prefix ELF-X86-64-UNWIND
9
10COFF-I386: header:
11COFF-I386-NEXT:  Machine: IMAGE_FILE_MACHINE_I386
12
13COFF-I386: sections:
14COFF-I386-NEXT:  - Name: .text
15COFF-I386-NEXT:    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
16COFF-I386-NEXT:    Alignment: 16
17COFF-I386-NEXT:    SectionData:  83EC0CC744240800000000C7042400000000E800000000E8000000008B44240883C40CC3
18
19COFF-I386:    Relocations:
20COFF-I386-NEXT:      - VirtualAddress: 14
21COFF-I386-NEXT:        SymbolName: L_.str
22COFF-I386-NEXT:        Type: IMAGE_REL_I386_DIR32
23
24COFF-I386:           - VirtualAddress: 19
25COFF-I386-NEXT:        SymbolName: _puts
26COFF-I386-NEXT:        Type: IMAGE_REL_I386_REL32
27
28COFF-I386:           - VirtualAddress: 24
29COFF-I386-NEXT:        SymbolName: _SomeOtherFunction
30COFF-I386-NEXT:        Type: IMAGE_REL_I386_REL32
31
32COFF-I386:       - Name: .data
33COFF-I386-NEXT:    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
34COFF-I386-NEXT:    Alignment: 1
35COFF-I386-NEXT:    SectionData: 48656C6C6F20576F726C642100
36
37COFF-I386: symbols:
38COFF-I386-NEXT:  - Name: .text
39COFF-I386-NEXT:    Value: 0
40COFF-I386-NEXT:    SectionNumber: 1
41COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
42COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
43COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
44COFF-I386-NEXT:    SectionDefinition:
45COFF-I386-NEXT:      Length:          36
46COFF-I386-NEXT:      NumberOfRelocations: 3
47COFF-I386-NEXT:      NumberOfLinenumbers: 0
48COFF-I386-NEXT:      CheckSum:        0
49COFF-I386-NEXT:      Number:          1
50
51COFF-I386:       - Name: .data
52COFF-I386-NEXT:    Value: 0
53COFF-I386-NEXT:    SectionNumber: 2
54COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
55COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
56COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
57COFF-I386-NEXT:    SectionDefinition:
58COFF-I386-NEXT:      Length:          13
59COFF-I386-NEXT:      NumberOfRelocations: 0
60COFF-I386-NEXT:      NumberOfLinenumbers: 0
61COFF-I386-NEXT:      CheckSum:        0
62COFF-I386-NEXT:      Number:          2
63
64COFF-I386:       - Name: _main
65COFF-I386-NEXT:    Value: 0
66COFF-I386-NEXT:    SectionNumber: 1
67COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
68COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_FUNCTION
69COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
70
71COFF-I386:       - Name: L_.str
72COFF-I386-NEXT:    Value: 0
73COFF-I386-NEXT:    SectionNumber: 2
74COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
75COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
76COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_STATIC
77
78COFF-I386:       - Name: _puts
79COFF-I386-NEXT:    Value: 0
80COFF-I386-NEXT:    SectionNumber: 0
81COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
82COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
83COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
84
85COFF-I386:       - Name: _SomeOtherFunction
86COFF-I386-NEXT:    Value: 0
87COFF-I386-NEXT:    SectionNumber: 0
88COFF-I386-NEXT:    SimpleType: IMAGE_SYM_TYPE_NULL
89COFF-I386-NEXT:    ComplexType: IMAGE_SYM_DTYPE_NULL
90COFF-I386-NEXT:    StorageClass: IMAGE_SYM_CLASS_EXTERNAL
91
92
93COFF-X86-64: header:
94COFF-X86-64-NEXT:  Machine: IMAGE_FILE_MACHINE_AMD64
95
96COFF-X86-64: sections:
97COFF-X86-64-NEXT:   - Name: .text
98COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
99COFF-X86-64-NEXT:     Alignment: 16
100COFF-X86-64-NEXT:     SectionData: 4883EC28C744242400000000488D0D00000000E800000000E8000000008B4424244883C428C3
101
102COFF-X86-64:     Relocations:
103COFF-X86-64-NEXT:       - VirtualAddress: 15
104COFF-X86-64-NEXT:         SymbolName: L.str
105COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
106
107COFF-X86-64:            - VirtualAddress: 20
108COFF-X86-64-NEXT:         SymbolName: puts
109COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
110
111COFF-X86-64:            - VirtualAddress: 25
112COFF-X86-64-NEXT:         SymbolName: SomeOtherFunction
113COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_REL32
114
115COFF-X86-64:        - Name: .data
116COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
117COFF-X86-64-NEXT:     Alignment: 1
118COFF-X86-64-NEXT:     SectionData: 48656C6C6F20576F726C642100
119
120COFF-X86-64:        - Name: '.CRT$XCU'
121COFF-X86-64-NEXT:     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
122COFF-X86-64-NEXT:     Alignment: 8
123COFF-X86-64-NEXT:     SectionData:  '0000000000000000'
124
125COFF-X86-64:     Relocations:
126COFF-X86-64-NEXT:       - VirtualAddress: 0
127COFF-X86-64-NEXT:         SymbolName: '??__Ex@@YAXXZ'
128COFF-X86-64-NEXT:         Type: IMAGE_REL_AMD64_ADDR64
129
130COFF-X86-64: symbols:
131COFF-X86-64-NEXT:   - Name: .text
132COFF-X86-64-NEXT:     Value: 0
133COFF-X86-64-NEXT:     SectionNumber: 1
134COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
135COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
136COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
137COFF-X86-64-NEXT:    SectionDefinition:
138COFF-X86-64-NEXT:      Length:          38
139COFF-X86-64-NEXT:      NumberOfRelocations: 3
140COFF-X86-64-NEXT:      NumberOfLinenumbers: 0
141COFF-X86-64-NEXT:      CheckSum:        0
142COFF-X86-64-NEXT:      Number:          1
143
144COFF-X86-64:        - Name: .data
145COFF-X86-64-NEXT:     Value: 0
146COFF-X86-64-NEXT:     SectionNumber: 2
147COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
148COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
149COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
150COFF-X86-64-NEXT:    SectionDefinition:
151COFF-X86-64-NEXT:      Length:          13
152COFF-X86-64-NEXT:      NumberOfRelocations: 0
153COFF-X86-64-NEXT:      NumberOfLinenumbers: 0
154COFF-X86-64-NEXT:      CheckSum:        0
155COFF-X86-64-NEXT:      Number:          2
156
157COFF-X86-64:        - Name: main
158COFF-X86-64-NEXT:     Value: 0
159COFF-X86-64-NEXT:     SectionNumber: 1
160COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
161COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_FUNCTION
162COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
163
164COFF-X86-64:        - Name: L.str
165COFF-X86-64-NEXT:     Value: 0
166COFF-X86-64-NEXT:     SectionNumber: 2
167COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
168COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
169COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
170
171COFF-X86-64:        - Name: puts
172COFF-X86-64-NEXT:     Value: 0
173COFF-X86-64-NEXT:     SectionNumber: 0
174COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
175COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
176COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
177
178COFF-X86-64:        - Name: SomeOtherFunction
179COFF-X86-64-NEXT:     Value: 0
180COFF-X86-64-NEXT:     SectionNumber: 0
181COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
182COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_NULL
183COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_EXTERNAL
184
185COFF-X86-64:        - Name: '??__Ex@@YAXXZ'
186COFF-X86-64-NEXT:     Value: 0
187COFF-X86-64-NEXT:     SectionNumber: 3
188COFF-X86-64-NEXT:     SimpleType: IMAGE_SYM_TYPE_NULL
189COFF-X86-64-NEXT:     ComplexType: IMAGE_SYM_DTYPE_FUNCTION
190COFF-X86-64-NEXT:     StorageClass: IMAGE_SYM_CLASS_STATIC
191
192ELF-MIPSEL:      FileHeader:
193ELF-MIPSEL-NEXT:   Class:           ELFCLASS32
194ELF-MIPSEL-NEXT:   Data:            ELFDATA2LSB
195ELF-MIPSEL-NEXT:   OSABI:           ELFOSABI_GNU
196ELF-MIPSEL-NEXT:   Type:            ET_REL
197ELF-MIPSEL-NEXT:   Machine:         EM_MIPS
198ELF-MIPSEL-NEXT:   Flags:           [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
199ELF-MIPSEL-NEXT: Sections:
200ELF-MIPSEL-NEXT:   - Name:            .text
201ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
202ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
203ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
204ELF-MIPSEL-NEXT:     Content:         0000023C00004224E8FFBD271400BFAF1000B0AF218059000000018E000024240000198E09F8200321E000020000198E09F8200321E00002000002241000B08F1400BF8F0800E0031800BD27
205ELF-MIPSEL-NEXT:   - Name:            .rel.text
206ELF-MIPSEL-NEXT:     Type:            SHT_REL
207ELF-MIPSEL-NEXT:     Link:            .symtab
208ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
209ELF-MIPSEL-NEXT:     Info:            .text
210ELF-MIPSEL-NEXT:     Relocations:
211ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000000
212ELF-MIPSEL-NEXT:         Symbol:          _gp_disp
213ELF-MIPSEL-NEXT:         Type:            R_MIPS_HI16
214ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000004
215ELF-MIPSEL-NEXT:         Symbol:          _gp_disp
216ELF-MIPSEL-NEXT:         Type:            R_MIPS_LO16
217ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000018
218ELF-MIPSEL-NEXT:         Symbol:          '$.str'
219ELF-MIPSEL-NEXT:         Type:            R_MIPS_GOT16
220ELF-MIPSEL-NEXT:       - Offset:          0x000000000000001C
221ELF-MIPSEL-NEXT:         Symbol:          '$.str'
222ELF-MIPSEL-NEXT:         Type:            R_MIPS_LO16
223ELF-MIPSEL-NEXT:       - Offset:          0x0000000000000020
224ELF-MIPSEL-NEXT:         Symbol:          puts
225ELF-MIPSEL-NEXT:         Type:            R_MIPS_CALL16
226ELF-MIPSEL-NEXT:       - Offset:          0x000000000000002C
227ELF-MIPSEL-NEXT:         Symbol:          SomeOtherFunction
228ELF-MIPSEL-NEXT:         Type:            R_MIPS_CALL16
229ELF-MIPSEL-NEXT:   - Name:            .data
230ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
231ELF-MIPSEL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
232ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
233ELF-MIPSEL-NEXT:     Content:         ''
234ELF-MIPSEL-NEXT:   - Name:            .bss
235ELF-MIPSEL-NEXT:     Type:            SHT_NOBITS
236ELF-MIPSEL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
237ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000004
238ELF-MIPSEL-NEXT:     Size:            0x0000000000000004
239ELF-MIPSEL-NEXT:   - Name:            .mdebug.abi32
240ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
241ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000001
242ELF-MIPSEL-NEXT:     Content:         ''
243ELF-MIPSEL-NEXT:   - Name:            .rodata.str1.1
244ELF-MIPSEL-NEXT:     Type:            SHT_PROGBITS
245ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC, SHF_MERGE, SHF_STRINGS ]
246ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000001
247ELF-MIPSEL-NEXT:     Content:         48656C6C6F20576F726C640A00
248ELF-MIPSEL-NEXT:   - Name:            .reginfo
249ELF-MIPSEL-NEXT:     Type:            SHT_MIPS_REGINFO
250ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC ]
251ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000001
252ELF-MIPSEL-NEXT:     Content:         '000000000000000000000000000000000000000000000000'
253ELF-MIPSEL-NEXT:   - Name:            .MIPS.abiflags
254ELF-MIPSEL-NEXT:     Type:            SHT_MIPS_ABIFLAGS
255ELF-MIPSEL-NEXT:     Flags:           [ SHF_ALLOC ]
256ELF-MIPSEL-NEXT:     AddressAlign:    0x0000000000000008
257ELF-MIPSEL-NEXT:     ISA:             MIPS32
258ELF-MIPSEL-NEXT:     ISARevision:     0x01
259ELF-MIPSEL-NEXT:     FpABI:           FP_DOUBLE
260ELF-MIPSEL-NEXT:     GPRSize:         REG_32
261ELF-MIPSEL-NEXT:     CPR1Size:        REG_32
262ELF-MIPSEL-NEXT:     Flags1:          [ ODDSPREG ]
263ELF-MIPSEL-NEXT: Symbols:
264ELF-MIPSEL-NEXT:   Local:
265ELF-MIPSEL-NEXT:     - Name:            trivial.ll
266ELF-MIPSEL-NEXT:       Type:            STT_FILE
267ELF-MIPSEL-NEXT:     - Name:            '$.str'
268ELF-MIPSEL-NEXT:       Type:            STT_OBJECT
269ELF-MIPSEL-NEXT:       Section:         .rodata.str1.1
270ELF-MIPSEL-NEXT:       Size:            0x000000000000000D
271ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
272ELF-MIPSEL-NEXT:       Section:         .text
273ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
274ELF-MIPSEL-NEXT:       Section:         .data
275ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
276ELF-MIPSEL-NEXT:       Section:         .bss
277ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
278ELF-MIPSEL-NEXT:       Section:         .mdebug.abi32
279ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
280ELF-MIPSEL-NEXT:       Section:         .rodata.str1.1
281ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
282ELF-MIPSEL-NEXT:       Section:         .reginfo
283ELF-MIPSEL-NEXT:     - Type:            STT_SECTION
284ELF-MIPSEL-NEXT:       Section:         .MIPS.abiflags
285ELF-MIPSEL-NEXT:   Global:
286ELF-MIPSEL-NEXT:     - Name:            main
287ELF-MIPSEL-NEXT:       Type:            STT_FUNC
288ELF-MIPSEL-NEXT:       Section:         .text
289ELF-MIPSEL-NEXT:       Size:            0x000000000000004C
290ELF-MIPSEL-NEXT:     - Name:            var
291ELF-MIPSEL-NEXT:       Type:            STT_OBJECT
292ELF-MIPSEL-NEXT:       Section:         .bss
293ELF-MIPSEL-NEXT:       Size:            0x0000000000000004
294ELF-MIPSEL-NEXT:     - Name:            SomeOtherFunction
295ELF-MIPSEL-NEXT:     - Name:            _gp_disp
296ELF-MIPSEL-NEXT:     - Name:            puts
297
298ELF-MIPS64EL:      FileHeader:
299ELF-MIPS64EL-NEXT:   Class:           ELFCLASS64
300ELF-MIPS64EL-NEXT:   Data:            ELFDATA2LSB
301ELF-MIPS64EL-NEXT:   Type:            ET_REL
302ELF-MIPS64EL-NEXT:   Machine:         EM_MIPS
303ELF-MIPS64EL-NEXT:   Flags:           [ EF_MIPS_ARCH_3 ]
304ELF-MIPS64EL-NEXT: Sections:
305ELF-MIPS64EL-NEXT:   - Name:            .text
306ELF-MIPS64EL-NEXT:     Type:            SHT_PROGBITS
307ELF-MIPS64EL-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
308ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000010
309ELF-MIPS64EL-NEXT:     Content:         ''
310ELF-MIPS64EL-NEXT:   - Name:            .data
311ELF-MIPS64EL-NEXT:     Type:            SHT_PROGBITS
312ELF-MIPS64EL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
313ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000010
314ELF-MIPS64EL-NEXT:     Content:         '00000000000000000000000000000000'
315ELF-MIPS64EL-NEXT:   - Name:            .rela.data
316ELF-MIPS64EL-NEXT:     Type:            SHT_RELA
317ELF-MIPS64EL-NEXT:     Link:            .symtab
318ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000008
319ELF-MIPS64EL-NEXT:     Info:            .data
320ELF-MIPS64EL-NEXT:     Relocations:
321ELF-MIPS64EL-NEXT:       - Offset:          0
322ELF-MIPS64EL-NEXT:         Symbol:          zed
323ELF-MIPS64EL-NEXT:         Type:            R_MIPS_64
324ELF-MIPS64EL-NEXT:   - Name:            .bss
325ELF-MIPS64EL-NEXT:     Type:            SHT_NOBITS
326ELF-MIPS64EL-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
327ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000010
328ELF-MIPS64EL-NEXT:   - Name:            .MIPS.options
329ELF-MIPS64EL-NEXT:     Type:            SHT_MIPS_OPTIONS
330ELF-MIPS64EL-NEXT:     Flags:           [ SHF_ALLOC ]
331ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000008
332ELF-MIPS64EL-NEXT:     Content:         '01280000000000000000000000000000000000000000000000000000000000000000000000000000'
333ELF-MIPS64EL-NEXT:   - Name:            .pdr
334ELF-MIPS64EL-NEXT:     Type:            SHT_PROGBITS
335ELF-MIPS64EL-NEXT:     AddressAlign:    0x0000000000000004
336ELF-MIPS64EL-NEXT:     Content:         ''
337ELF-MIPS64EL-NEXT: Symbols:
338ELF-MIPS64EL-NEXT:   Local:
339ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
340ELF-MIPS64EL-NEXT:       Section:         .text
341ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
342ELF-MIPS64EL-NEXT:       Section:         .data
343ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
344ELF-MIPS64EL-NEXT:       Section:         .bss
345ELF-MIPS64EL-NEXT:     - Name:            bar
346ELF-MIPS64EL-NEXT:       Section:         .data
347ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
348ELF-MIPS64EL-NEXT:       Section:         .MIPS.options
349ELF-MIPS64EL-NEXT:     - Type:            STT_SECTION
350ELF-MIPS64EL-NEXT:       Section:         .pdr
351ELF-MIPS64EL-NEXT:   Global:
352ELF-MIPS64EL-NEXT:     - Name:            zed
353
354ELF-X86-64:      FileHeader:
355ELF-X86-64-NEXT:   Class:           ELFCLASS64
356ELF-X86-64-NEXT:   Data:            ELFDATA2LSB
357ELF-X86-64-NEXT:   OSABI:           ELFOSABI_GNU
358ELF-X86-64-NEXT:   Type:            ET_REL
359ELF-X86-64-NEXT:   Machine:         EM_X86_64
360ELF-X86-64-NEXT: Sections:
361ELF-X86-64-NEXT:   - Name:            .text
362ELF-X86-64-NEXT:     Type:            SHT_PROGBITS
363ELF-X86-64-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
364ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000010
365ELF-X86-64-NEXT:     Content:         4883EC08C744240400000000BF00000000E80000000030C0E8000000008B4424044883C408C3
366ELF-X86-64-NEXT:   - Name:            .rodata.str1.1
367ELF-X86-64-NEXT:     Type:            SHT_PROGBITS
368ELF-X86-64-NEXT:     Flags:           [ SHF_ALLOC, SHF_MERGE, SHF_STRINGS ]
369ELF-X86-64-NEXT:     Address:         0x0000000000000026
370ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000001
371ELF-X86-64-NEXT:     Content:         48656C6C6F20576F726C642100
372ELF-X86-64-NEXT:   - Name:            .note.GNU-stack
373ELF-X86-64-NEXT:     Type:            SHT_PROGBITS
374ELF-X86-64-NEXT:     Address:         0x0000000000000033
375ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000001
376ELF-X86-64-NEXT:     Content:         ''
377ELF-X86-64-NEXT:   - Name:            .rela.text
378ELF-X86-64-NEXT:     Type:            SHT_RELA
379ELF-X86-64-NEXT:     Address:         0x0000000000000038
380ELF-X86-64-NEXT:     Link:            .symtab
381ELF-X86-64-NEXT:     AddressAlign:    0x0000000000000008
382ELF-X86-64-NEXT:     Info:            .text
383ELF-X86-64-NEXT:     Relocations:
384ELF-X86-64-NEXT:       - Offset:          0x000000000000000D
385ELF-X86-64-NEXT:         Symbol:          ''
386ELF-X86-64-NEXT:         Type:            R_X86_64_32S
387ELF-X86-64-NEXT:       - Offset:          0x0000000000000012
388ELF-X86-64-NEXT:         Symbol:          puts
389ELF-X86-64-NEXT:         Type:            R_X86_64_PC32
390ELF-X86-64-NEXT:         Addend:          -4
391ELF-X86-64-NEXT:       - Offset:          0x0000000000000019
392ELF-X86-64-NEXT:         Symbol:          SomeOtherFunction
393ELF-X86-64-NEXT:         Type:            R_X86_64_PC32
394ELF-X86-64-NEXT:         Addend:          -4
395ELF-X86-64-NEXT: Symbols:
396ELF-X86-64-NEXT:   Local:
397ELF-X86-64-NEXT:     - Name:            trivial-object-test.s
398ELF-X86-64-NEXT:       Type:            STT_FILE
399ELF-X86-64-NEXT:     - Type:            STT_SECTION
400ELF-X86-64-NEXT:       Section:         .text
401ELF-X86-64-NEXT:     - Type:            STT_SECTION
402ELF-X86-64-NEXT:       Section:         .rodata.str1.1
403ELF-X86-64-NEXT:     - Type:            STT_SECTION
404ELF-X86-64-NEXT:       Section:         .note.GNU-stack
405ELF-X86-64-NEXT:   Global:
406ELF-X86-64-NEXT:     - Name:            main
407ELF-X86-64-NEXT:       Type:            STT_FUNC
408ELF-X86-64-NEXT:       Section:         .text
409ELF-X86-64-NEXT:       Size:            0x0000000000000026
410ELF-X86-64-NEXT:     - Name:            SomeOtherFunction
411ELF-X86-64-NEXT:     - Name:            puts
412
413
414ELF-AVR:      FileHeader:
415ELF-AVR-NEXT:   Class:           ELFCLASS32
416ELF-AVR-NEXT:   Data:            ELFDATA2LSB
417ELF-AVR-NEXT:   Type:            ET_EXEC
418ELF-AVR-NEXT:   Machine:         EM_AVR
419ELF-AVR-NEXT:   Flags:           [ EF_AVR_ARCH_AVR2 ]
420ELF-AVR-NEXT: Sections:
421ELF-AVR-NEXT:   - Name:            .text
422ELF-AVR-NEXT:     Type:            SHT_PROGBITS
423ELF-AVR-NEXT:     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
424ELF-AVR-NEXT:     AddressAlign:    0x0000000000000002
425ELF-AVR-NEXT:     Content:         C20E0895
426ELF-AVR-NEXT:   - Name:            .data
427ELF-AVR-NEXT:     Type:            SHT_PROGBITS
428ELF-AVR-NEXT:     Flags:           [ SHF_WRITE, SHF_ALLOC ]
429ELF-AVR-NEXT:     Address:         0x0000000000800060
430ELF-AVR-NEXT:     AddressAlign:    0x0000000000000001
431ELF-AVR-NEXT:     Content:         ''
432ELF-AVR-NEXT: Symbols:
433ELF-AVR-NEXT:   Local:
434ELF-AVR-NEXT:     - Type:            STT_SECTION
435ELF-AVR-NEXT:       Section:         .text
436ELF-AVR-NEXT:     - Type:            STT_SECTION
437ELF-AVR-NEXT:       Section:         .data
438ELF-AVR-NEXT:       Value:           0x0000000000800060
439ELF-AVR-NEXT:     - Name:            a.o
440ELF-AVR-NEXT:       Type:            STT_FILE
441ELF-AVR-NEXT:     - Name:            main
442ELF-AVR-NEXT:       Section:         .text
443ELF-AVR-NEXT:   Global:
444ELF-AVR-NEXT:     - Name:            __trampolines_start
445ELF-AVR-NEXT:       Section:         .text
446ELF-AVR-NEXT:     - Name:            _etext
447ELF-AVR-NEXT:       Section:         .text
448ELF-AVR-NEXT:       Value:           0x0000000000000004
449ELF-AVR-NEXT:     - Name:            __data_load_end
450ELF-AVR-NEXT:       Value:           0x0000000000000004
451ELF-AVR-NEXT:     - Name:            __trampolines_end
452ELF-AVR-NEXT:       Section:         .text
453ELF-AVR-NEXT:     - Name:            __data_load_start
454ELF-AVR-NEXT:       Value:           0x0000000000000004
455ELF-AVR-NEXT:     - Name:            __dtors_end
456ELF-AVR-NEXT:       Section:         .text
457ELF-AVR-NEXT:     - Name:            __eeprom_end
458ELF-AVR-NEXT:       Section:         .data
459ELF-AVR-NEXT:       Value:           0x0000000000810000
460ELF-AVR-NEXT:     - Name:            __ctors_start
461ELF-AVR-NEXT:       Section:         .text
462ELF-AVR-NEXT:     - Name:            __dtors_start
463ELF-AVR-NEXT:       Section:         .text
464ELF-AVR-NEXT:     - Name:            __ctors_end
465ELF-AVR-NEXT:       Section:         .text
466ELF-AVR-NEXT:     - Name:            _edata
467ELF-AVR-NEXT:       Section:         .data
468ELF-AVR-NEXT:       Value:           0x0000000000800060
469ELF-AVR-NEXT:     - Name:            _end
470ELF-AVR-NEXT:       Section:         .data
471ELF-AVR-NEXT:       Value:           0x0000000000800060
472
473
474ELF-X86-64-UNWIND:      - Name:            .eh_frame
475ELF-X86-64-UNWIND-NEXT:   Type:            SHT_X86_64_UNWIND
476ELF-X86-64-UNWIND-NEXT:   Flags:           [ SHF_ALLOC ]
477ELF-X86-64-UNWIND-NEXT:   AddressAlign:    0x0000000000000001
478ELF-X86-64-UNWIND-NEXT:   Content:         ''
479
480RUN: not obj2yaml %t.blah 2>&1 | FileCheck --check-prefix=ENOENT %s
481ENOENT: Error: '{{[Nn]}}o such file or directory'
482