1# RUN: yaml2obj %s -o %t
2# RUN: echo 0000 > %t.sec
3# RUN: llvm-objcopy -R .test2 --add-section=.test2=%t.sec %t %t2
4# RUN: llvm-readobj --file-headers --sections --section-data %t2 | FileCheck %s
5
6!ELF
7FileHeader:
8  Class:           ELFCLASS64
9  Data:            ELFDATA2LSB
10  Type:            ET_REL
11  Machine:         EM_X86_64
12Sections:
13  - Name:            .test1
14    Type:            SHT_PROGBITS
15    Flags:           [ SHF_ALLOC ]
16    Content:        "c3c3c3c3"
17  - Name:            .test2
18    Type:            SHT_PROGBITS
19    Flags:           [ SHF_ALLOC ]
20    Content:        "DEADBEEF"
21  - Name:            .test3
22    Type:            SHT_PROGBITS
23    Flags:           [ SHF_ALLOC ]
24    Content:        "32323232"
25
26# CHECK: SectionHeaderCount: 6
27
28# CHECK: Name: .test1
29# CHECK: Name: .test3
30# CHECK: Name: .strtab
31# CHECK: Name: .shstrtab
32# CHECK: Name: .test2
33# CHECK: SectionData (
34# CHECK-NEXT:   0000: 30303030
35# CHECK-NEXT: )
36