1# RUN: yaml2obj -format=elf %s | llvm-readobj -sections -section-data - | FileCheck %s
2!ELF
3FileHeader:
4  Class: ELFCLASS64
5  Data: ELFDATA2LSB
6  Type: ET_REL
7  Machine: EM_X86_64
8Sections:
9  - Name: .text
10    Type: SHT_PROGBITS
11    Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
12    Address: 0xCAFEBABE
13    Link: .text # Doesn't make sense for SHT_PROGBITS, but good enough for test.
14    Content: EBFE
15    AddressAlign: 2
16
17# CHECK:        Section {
18# CHECK:          Index: 0
19# CHECK:          Type: SHT_NULL (0x0)
20#
21# CHECK:        Section {
22# CHECK:          Name: .text
23# CHECK:          Type: SHT_PROGBITS (0x1)
24# CHECK-NEXT:     Flags [ (0x6)
25# CHECK-NEXT:       SHF_ALLOC (0x2)
26# CHECK-NEXT:       SHF_EXECINSTR (0x4)
27# CHECK-NEXT:     ]
28# CHECK-NEXT:     Address: 0xCAFEBABE
29# CHECK:          Size: 2
30# Check that Link != 0.
31# CHECK:          Link: {{[1-9][0-9]*}}
32# CHECK:          AddressAlignment: 2
33# CHECK:          SectionData (
34# CHECK-NEXT:       0000: EBFE
35# CHECK-NEXT:     )
36