summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/ELF/invalid-shstrndx.test
blob: 270d558f6d9a4ba89c1ee7662151a151e4872c80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# RUN: yaml2obj %s -o %t
# RUN: not llvm-readelf --headers -S 2>&1 %t | FileCheck %s -DFILE=%t --check-prefix=GNU
# RUN: not llvm-readobj --headers -S 2>&1 %t | FileCheck %s -DFILE=%t --check-prefix=LLVM

# GNU:      ELF Header:
# GNU:        Section header string table index: 255
# GNU-NEXT:   There are 3 section headers, starting at offset 0x58:
# GNU:      Section Headers:
# GNU-NEXT:  [Nr] Name
# GNU-NEXT:  error: '[[FILE]]': section header string table index 255 does not exist

# LLVM:      ElfHeader {
# LLVM:        StringTableSectionIndex: 255
# LLVM-NEXT: }
# LLVM-NEXT: Sections [
# LLVM-NEXT: error: '[[FILE]]': section header string table index 255 does not exist

--- !ELF
FileHeader:
  Class:     ELFCLASS64
  Data:      ELFDATA2LSB
  Type:      ET_REL
  Machine:   EM_X86_64
  SHStrNdx:  0xFF
OpenPOWER on IntegriCloud