invalid-shstrndx.test
1.73 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# RUN: yaml2obj %s -o %t
# RUN: not llvm-readelf --headers -S 2>&1 %t | FileCheck %s -DFILE=%t --check-prefix=GNU
# RUN: 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 Type Address Off Size ES Flg Lk Inf Al
# GNU-NEXT: warning: '[[FILE]]': section header string table index 255 does not exist
# GNU-NEXT: [ 0] <no-strings> NULL 0000000000000000 000000 000000 00 0 0 0
# GNU-NEXT: [ 1] <no-strings> STRTAB 0000000000000000 000040 000001 00 0 0 1
# GNU-NEXT: [ 2] <no-strings> STRTAB 0000000000000000 000041 000013 00 0 0 1
# GNU-NEXT: Key to Flags:
# GNU: Section to Segment mapping:
# GNU-NEXT: Segment Sections...
# 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: warning: '[[FILE]]': section header string table index 255 does not exist
# LLVM-NEXT: Section {
# LLVM-NEXT: Index: 0
# LLVM-NEXT: Name: <?> (0)
# LLVM-NEXT: Type: SHT_NULL (0x0)
# LLVM-NEXT: Flags [ (0x0)
# LLVM-NEXT: ]
# LLVM-NEXT: Address: 0x0
# LLVM-NEXT: Offset: 0x0
# LLVM-NEXT: Size: 0
# LLVM-NEXT: Link: 0
# LLVM-NEXT: Info: 0
# LLVM-NEXT: AddressAlignment: 0
# LLVM-NEXT: EntrySize: 0
# LLVM-NEXT: }
# LLVM: Index: 1
# LLVM-NEXT: Name: <?> (11)
# LLVM: Index: 2
# LLVM-NEXT: Name: <?> (1)
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
EShStrNdx: 0xFF