You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
794 B
30 lines
794 B
4 months ago
|
## Check we do not crash/assert when dumping a broken section name.
|
||
|
## Here we replace the section name with a sequence of characters that
|
||
|
## are not representable as unsigned char.
|
||
|
## We used to assert for this case before.
|
||
|
|
||
|
# RUN: yaml2obj %s -o %t
|
||
|
# RUN: obj2yaml %t | FileCheck %s
|
||
|
|
||
|
# CHECK: --- !ELF
|
||
|
# CHECK-NEXT: FileHeader:
|
||
|
# CHECK-NEXT: Class: ELFCLASS64
|
||
|
# CHECK-NEXT: Data: ELFDATA2LSB
|
||
|
# CHECK-NEXT: Type: ET_REL
|
||
|
# CHECK-NEXT: Sections:
|
||
|
# CHECK-NEXT: - Name: "{{.*}}"
|
||
|
# CHECK-NEXT: Type: SHT_PROGBITS
|
||
|
# CHECK-NEXT: ...
|
||
|
|
||
|
--- !ELF
|
||
|
FileHeader:
|
||
|
Class: ELFCLASS64
|
||
|
Data: ELFDATA2LSB
|
||
|
Type: ET_REL
|
||
|
Sections:
|
||
|
- Name: foo
|
||
|
Type: SHT_PROGBITS
|
||
|
- Name: .shstrtab
|
||
|
Type: SHT_STRTAB
|
||
|
Content: "00FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00"
|