1# RUN: yaml2obj %s -o %t
2# RUN: llvm-objcopy %t %t2
3# RUN: llvm-readobj --sections %t2 | FileCheck %s
4
5!ELF
6FileHeader:
7  Class:           ELFCLASS64
8  Data:            ELFDATA2LSB
9  Type:            ET_EXEC
10  Machine:         EM_X86_64
11Sections:
12  - Name:            .bss
13    Type:            SHT_NOBITS
14    Flags:           [ SHF_ALLOC ]
15    AddressAlign:    0x0000000000000010
16    Size:            64
17  - Name:            .text
18    Type:            SHT_PROGBITS
19    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
20    AddressAlign:    0x0000000000000010
21    Content:         "00000000"
22
23# CHECK: Type: SHT_NULL
24
25# CHECK:      Name: .bss
26# CHECK-NEXT: Type: SHT_NOBITS
27# CHECK-NEXT: Flags [
28# CHECK-NEXT:   SHF_ALLOC
29# CHECK-NEXT: ]
30# CHECK-NEXT: Address:
31# CHECK-NEXT: Offset: [[OFFSET:0x[0-9A-F]+]]
32# CHECK-NEXT: Size: 64
33
34# CHECK:      Name: .text
35# CHECK-NEXT: Type: SHT_PROGBITS
36# CHECK-NEXT: Flags [
37# CHECK-NEXT:   SHF_ALLOC
38# CHECK-NEXT:   SHF_EXECINSTR
39# CHECK-NEXT: ]
40# CHECK-NEXT: Address:
41# CHECK-NEXT: Offset: [[OFFSET]]
42# CHECK-NEXT: Size: 4
43
44# CHECK:      Name: .shstrtab
45# CHECK-NEXT: Type: SHT_STRTAB
46# CHECK-NEXT: Flags [
47# CHECK-NEXT: ]
48