1 // Section name offset overflows section name string table.
2 RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -sections \
3 RUN: 2>&1 | FileCheck --check-prefix=SECNAME %s
5 SECNAME: Error reading file: Invalid data was encountered while parsing the file.
8 // Section data offset past end of file.
9 RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -sections -section-data \
10 RUN: 2>&1 | FileCheck --check-prefix=SECDATA %s
12 SECDATA: Error reading file: Invalid data was encountered while parsing the file.
15 // Symbol name offset overflows string table.
16 RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -symbols \
17 RUN: 2>&1 | FileCheck --check-prefix=SYMNAME %s
19 SYMNAME: Error reading file: Invalid data was encountered while parsing the file.
22 // Version index in .gnu.version overflows the version map.
23 RUN: not llvm-readobj %p/Inputs/corrupt-version.elf-x86_64 -dt \
24 RUN: 2>&1 | FileCheck --check-prefix=VER %s
26 VER: Error reading file: Invalid data was encountered while parsing the file.
29 // The file is missing the dynamic string table but has references to it.
30 RUN: not llvm-readobj -dynamic-table %p/Inputs/corrupt-invalid-strtab.elf.x86-64 \
31 RUN: 2>&1 | FileCheck --check-prefix=STRTAB %s
33 STRTAB: Invalid dynamic string table reference