• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RUN: not llvm-dwarfdump %p/Inputs/invalid-bad-rel-type.elf 2>&1 | FileCheck %s
2RUN: not llvm-objdump -s %p/Inputs/invalid-strtab-type.elf 2>&1 | FileCheck %s
3RUN: not llvm-objdump -s %p/Inputs/invalid-strtab-size.elf 2>&1 | FileCheck %s
4CHECK: Invalid data was encountered while parsing the file
5
6RUN: not llvm-objdump -s %p/Inputs/invalid-strtab-non-null.elf 2>&1 | FileCheck --check-prefix=NON-NULL %s
7NON-NULL: String table must end with a null terminator
8
9Test the sh_entsize are invalid
10RUN: llvm-readobj -s %p/Inputs/invalid-sh_entsize.elf | FileCheck --check-prefix=SECTION %s
11
12SECTION:         Name: .dynsym
13SECTION-NEXT:    Type: SHT_DYNSYM
14SECTION-NEXT:    Flags [
15SECTION-NEXT:      SHF_ALLOC
16SECTION-NEXT:    ]
17SECTION-NEXT:    Address:
18SECTION-NEXT:    Offset:
19SECTION-NEXT:    Size:
20SECTION-NEXT:    Link:
21SECTION-NEXT:    Info:
22SECTION-NEXT:    AddressAlignment:
23SECTION-NEXT:    EntrySize: 32
24
25SECTION:         Name: .symtab
26SECTION-NEXT:    Type: SHT_SYMTAB
27SECTION-NEXT:    Flags [
28SECTION-NEXT:    ]
29SECTION-NEXT:    Address:
30SECTION-NEXT:    Offset:
31SECTION-NEXT:    Size:
32SECTION-NEXT:    Link:
33SECTION-NEXT:    Info:
34SECTION-NEXT:    AddressAlignment:
35SECTION-NEXT:    EntrySize: 32
36
37RUN: not llvm-readobj -t %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-SYM-SIZE %s
38RUN: not llvm-readobj --dyn-symbols %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-SYM-SIZE %s
39INVALID-SYM-SIZE: Invalid symbol size
40
41RUN: not llvm-readobj -t %p/Inputs/invalid-section-index.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-INDEX %s
42
43INVALID-SECTION-INDEX: Invalid section index
44
45RUN: not llvm-readobj -s %p/Inputs/invalid-section-size.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-SIZE %s
46INVALID-SECTION-SIZE: Invalid section header entry size (e_shentsize) in ELF header
47
48
49RUN: not llvm-readobj -t %p/Inputs/invalid-symbol-table-size.elf 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-SIZE %s
50INVALID-SYMTAB-SIZE: Invalid symbol table size
51
52
53RUN: not llvm-readobj -t %p/Inputs/invalid-xindex-size.elf 2>&1 | FileCheck --check-prefix=INVALID-XINDEX-SIZE %s
54INVALID-XINDEX-SIZE: Invalid data was encountered while parsing the file.
55