reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
## Check we do not crash/assert when dumping a broken section name.
## Here we replace "foo" name with a sequence of characters that
## are not representable as unsigned char.
## We used to have an 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:   Machine: EM_X86_64
# CHECK-NEXT: Sections:
# CHECK-NEXT:   - Name: "{{.*}}"
# CHECK-NEXT:     Type: SHT_PROGBITS
# CHECK-NEXT: ...

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    ET_REL
  Machine: EM_X86_64
Sections:
  - Name: foo
    Type: SHT_PROGBITS
  - Name: .shstrtab
    Type: SHT_STRTAB
    Content: "00FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00"