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
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
20 # LLVM: StringTableSectionIndex: 255
22 # LLVM-NEXT: Sections [
23 # LLVM-NEXT: Section {
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)
30 # LLVM-NEXT: Address: 0x0
31 # LLVM-NEXT: Offset: 0x0
35 # LLVM-NEXT: AddressAlignment: 0
36 # LLVM-NEXT: EntrySize: 0
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)
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)