Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / yaml2obj / unnamed-section.yaml
blobe0d664e06d4f1f74954719c80dae031cad1a0123
1 # Ensure yaml2obj doesn't crash on unnamed sections
2 # RUN: yaml2obj %s -o %t
3 # RUN: llvm-readobj --sections %t | FileCheck %s
5 !ELF
6 FileHeader:
7   Class:           ELFCLASS64
8   Data:            ELFDATA2LSB
9   Type:            ET_EXEC
10   Machine:         EM_X86_64
11 Sections:
12   - Type:            SHT_PROGBITS
13   - Name:            .text
14     Type:            SHT_PROGBITS
15     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
17 # CHECK: Name:  (
18 # CHECK-NEXT: Type: SHT_NULL
19 # CHECK: Name:  (
20 # CHECK-NEXT: Type: SHT_PROGBITS
21 # CHECK: Name: .text
22 # CHECK-NEXT: Type: SHT_PROGBITS