• 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
38INVALID-SYM-SIZE: Invalid symbol size
39
40RUN: not llvm-readobj --dyn-symbols %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-DYNSYM-SIZE %s
41INVALID-DYNSYM-SIZE: Invalid entity size
42
43RUN: not llvm-readobj -t %p/Inputs/invalid-section-index.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-INDEX %s
44
45INVALID-SECTION-INDEX: Invalid section index
46
47RUN: not llvm-readobj -s %p/Inputs/invalid-section-size.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-SIZE %s
48INVALID-SECTION-SIZE: Invalid section header entry size (e_shentsize) in ELF header
49
50
51RUN: not llvm-readobj -t %p/Inputs/invalid-symbol-table-size.elf 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-SIZE %s
52INVALID-SYMTAB-SIZE: Invalid symbol table size
53
54
55RUN: not llvm-readobj -t %p/Inputs/invalid-xindex-size.elf 2>&1 | FileCheck --check-prefix=INVALID-XINDEX-SIZE %s
56INVALID-XINDEX-SIZE: Invalid data was encountered while parsing the file.
57