1// Section name offset overflows section name string table. 2RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -sections \ 3RUN: 2>&1 | FileCheck --check-prefix=SECNAME %s 4 5SECNAME: Error reading file: Invalid data was encountered while parsing the file. 6 7 8// Section data offset past end of file. 9RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -sections -section-data \ 10RUN: 2>&1 | FileCheck --check-prefix=SECDATA %s 11 12SECDATA: Error reading file: Invalid data was encountered while parsing the file. 13 14 15// Symbol name offset overflows string table. 16RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -symbols \ 17RUN: 2>&1 | FileCheck --check-prefix=SYMNAME %s 18 19SYMNAME: Error reading file: Invalid data was encountered while parsing the file. 20 21 22// Version index in .gnu.version overflows the version map. 23RUN: not llvm-readobj %p/Inputs/corrupt-version.elf-x86_64 -dt \ 24RUN: 2>&1 | FileCheck --check-prefix=VER %s 25 26VER: Error reading file: Invalid version entry. 27 28 29// The file is missing the dynamic string table but has references to it. 30RUN: not llvm-readobj -dynamic-table %p/Inputs/corrupt-invalid-strtab.elf.x86-64 \ 31RUN: 2>&1 | FileCheck --check-prefix=STRTAB %s 32 33STRTAB: Invalid dynamic string table reference 34 35RUN: not llvm-readobj -program-headers \ 36RUN: %p/Inputs/corrupt-invalid-phentsize.elf.x86-64 2>&1 | \ 37RUN: FileCheck --check-prefix=PHENTSIZE %s 38 39PHENTSIZE: Invalid program header size 40 41RUN: not llvm-readobj -dynamic-table \ 42RUN: %p/Inputs/corrupt-invalid-virtual-addr.elf.x86-64 2>&1 | \ 43RUN: FileCheck --check-prefix=VIRTADDR %s 44 45VIRTADDR: Virtual address is not in any segment 46 47 48RUN: not llvm-readobj -dyn-relocations \ 49RUN: %p/Inputs/corrupt-invalid-relocation-size.elf.x86-64 2>&1 | \ 50RUN: FileCheck --check-prefix=RELOC %s 51 52RELOC: Invalid relocation entry size 53 54RUN: not llvm-readobj -dyn-relocations \ 55RUN: %p/Inputs/corrupt-invalid-dynamic-table-size.elf.x86-64 2>&1 | \ 56RUN: FileCheck --check-prefix=DYN-TABLE-SIZE %s 57 58DYN-TABLE-SIZE: Invalid dynamic table size 59 60 61RUN: not llvm-readobj -dyn-relocations \ 62RUN: %p/Inputs/corrupt-invalid-dynamic-table-offset.elf.x86-64 2>&1 | \ 63RUN: FileCheck --check-prefix=DYN-TABLE-OFFSET %s 64 65DYN-TABLE-OFFSET: Invalid data was encountered while parsing the file. 66 67 68RUN: not llvm-readobj -dyn-relocations \ 69RUN: %p/Inputs/corrupt-invalid-dynamic-table-too-large.elf.x86-64 2>&1 | \ 70RUN: FileCheck --check-prefix=DYN-TABLE-TOO-LARGE %s 71 72DYN-TABLE-TOO-LARGE: Invalid data was encountered while parsing the file. 73