• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: yaml2obj %s -o %t
2# RUN: not llvm-readelf --headers -S 2>&1 %t | FileCheck %s -DFILE=%t --check-prefix=GNU
3# RUN: llvm-readobj --headers -S 2>&1 %t | FileCheck %s -DFILE=%t --check-prefix=LLVM
4
5# GNU:      ELF Header:
6# GNU:        Section header string table index: 255
7# GNU-NEXT:   There are 3 section headers, starting at offset 0x58:
8# GNU:      Section Headers:
9# GNU-NEXT:  [Nr] Name         Type   Address          Off    Size   ES Flg Lk Inf Al
10# GNU-NEXT: warning: '[[FILE]]': section header string table index 255 does not exist
11# GNU-NEXT:  [ 0] <no-strings> NULL   0000000000000000 000000 000000 00      0   0  0
12# GNU-NEXT:  [ 1] <no-strings> STRTAB 0000000000000000 000040 000001 00      0   0  1
13# GNU-NEXT:  [ 2] <no-strings> STRTAB 0000000000000000 000041 000013 00      0   0  1
14# GNU-NEXT: Key to Flags:
15# GNU:      Section to Segment mapping:
16# GNU-NEXT:   Segment Sections...
17# GNU-NEXT: error: '[[FILE]]': section header string table index 255 does not exist
18
19# LLVM:      ElfHeader {
20# LLVM:        StringTableSectionIndex: 255
21# LLVM-NEXT: }
22# LLVM-NEXT: Sections [
23# LLVM-NEXT: Section {
24# LLVM-NEXT:   Index: 0
25# LLVM-NEXT: warning: '[[FILE]]': unable to get the name of SHT_NULL section with index 0: section header string table index 255 does not exist
26# LLVM-NEXT:   Name: <?> (0)
27# LLVM-NEXT:   Type: SHT_NULL (0x0)
28# LLVM-NEXT:   Flags [ (0x0)
29# LLVM-NEXT:   ]
30# LLVM-NEXT:   Address: 0x0
31# LLVM-NEXT:   Offset: 0x0
32# LLVM-NEXT:   Size: 0
33# LLVM-NEXT:   Link: 0
34# LLVM-NEXT:   Info: 0
35# LLVM-NEXT:   AddressAlignment: 0
36# LLVM-NEXT:   EntrySize: 0
37# LLVM-NEXT: }
38# LLVM:      Index: 1
39# LLVM-NEXT: warning: '[[FILE]]': unable to get the name of SHT_STRTAB section with index 1: section header string table index 255 does not exist
40# LLVM-NEXT: Name: <?> (11)
41# LLVM:      Index: 2
42# LLVM-NEXT: warning: '[[FILE]]': unable to get the name of SHT_STRTAB section with index 2: section header string table index 255 does not exist
43# LLVM-NEXT: Name: <?> (1)
44
45--- !ELF
46FileHeader:
47  Class:     ELFCLASS64
48  Data:      ELFDATA2LSB
49  Type:      ET_REL
50  EShStrNdx: 0xFF
51