1# RUN: yaml2obj -format=elf -docnum=1 %s \
2# RUN:   | llvm-readobj -symbols - | FileCheck -check-prefix=DOC1 %s
3# RUN: yaml2obj -format=elf -docnum=2 %s \
4# RUN:   | llvm-readobj -symbols - | FileCheck -check-prefix=DOC2 %s
5# RUN: not yaml2obj -format=elf -docnum=3 %s 2>&1 \
6# RUN:   | FileCheck -check-prefix=DOC3 %s
7
8# DOC1: Name: T1 (1)
9# DOC2: Name: T2 (1)
10# DOC3: yaml2obj: Cannot find the 3rd document
11
12--- !ELF
13FileHeader: !FileHeader
14  Class: ELFCLASS32
15  Data: ELFDATA2LSB
16  Type: ET_REL
17  Machine: EM_MIPS
18  Flags: [EF_MIPS_CPIC]
19
20Sections:
21- Name: .text
22  Type: SHT_PROGBITS
23  Content:  "0000000000000000"
24  AddressAlign: 16
25  Flags: [SHF_EXECINSTR, SHF_ALLOC]
26
27Symbols:
28  Global:
29    - Name: T1
30      Section: .text
31      Type: STT_FUNC
32      Value: 0x0
33      Size: 8
34
35--- !ELF
36FileHeader: !FileHeader
37  Class: ELFCLASS32
38  Data: ELFDATA2LSB
39  Type: ET_REL
40  Machine: EM_MIPS
41
42Sections:
43- Name: .text
44  Type: SHT_PROGBITS
45  Content:  "00000000"
46  AddressAlign: 16
47  Flags: [SHF_EXECINSTR, SHF_ALLOC]
48
49Symbols:
50  Global:
51    - Name: T2
52      Section: .text
53      Type: STT_FUNC
54      Value: 0x0
55      Size: 4
56...
57