Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / obj2yaml / ELF / invalid-section-name.yaml
blobffb039fd6d0698fe8cdd2c6ea5fe0a071c853354
1 ## Check we do not crash/assert when dumping a broken section name.
2 ## Here we replace the section name with a sequence of characters that
3 ## are not representable as unsigned char.
4 ## We used to assert for this case before. 
6 # RUN: yaml2obj %s -o %t
7 # RUN: obj2yaml %t | FileCheck %s
9 # CHECK:      --- !ELF
10 # CHECK-NEXT: FileHeader:
11 # CHECK-NEXT:   Class: ELFCLASS64
12 # CHECK-NEXT:   Data:  ELFDATA2LSB
13 # CHECK-NEXT:   Type:  ET_REL
14 # CHECK-NEXT:   SectionHeaderStringTable: {{.*}}
15 # CHECK-NEXT: Sections:
16 # CHECK-NEXT:   - Name: "{{.*}}"
17 # CHECK-NEXT:     Type: SHT_PROGBITS
18 # CHECK-NEXT: ...
20 --- !ELF
21 FileHeader:
22   Class: ELFCLASS64
23   Data:  ELFDATA2LSB
24   Type:  ET_REL
25 Sections:
26   - Name: foo
27     Type: SHT_PROGBITS
28   - Name: .shstrtab
29     Type: SHT_STRTAB
30     Content: "00FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00"