2013-08-09 06:27:13 +08:00
|
|
|
// Section name offset overflows section name string table.
|
|
|
|
RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -sections \
|
|
|
|
RUN: 2>&1 | FileCheck --check-prefix=SECNAME %s
|
|
|
|
|
2015-07-20 11:31:25 +08:00
|
|
|
SECNAME: Error reading file: Invalid data was encountered while parsing the file.
|
|
|
|
|
|
|
|
|
2013-08-09 06:27:13 +08:00
|
|
|
// Section data offset past end of file.
|
|
|
|
RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -sections -section-data \
|
|
|
|
RUN: 2>&1 | FileCheck --check-prefix=SECDATA %s
|
|
|
|
|
2015-07-20 11:31:25 +08:00
|
|
|
SECDATA: Error reading file: Invalid data was encountered while parsing the file.
|
|
|
|
|
|
|
|
|
2013-08-09 06:27:13 +08:00
|
|
|
// Symbol name offset overflows string table.
|
|
|
|
RUN: not llvm-readobj %p/Inputs/corrupt.elf-x86-64 -symbols \
|
|
|
|
RUN: 2>&1 | FileCheck --check-prefix=SYMNAME %s
|
|
|
|
|
2015-07-20 11:31:25 +08:00
|
|
|
SYMNAME: Error reading file: Invalid data was encountered while parsing the file.
|
|
|
|
|
|
|
|
|
2013-08-09 06:27:13 +08:00
|
|
|
// Version index in .gnu.version overflows the version map.
|
|
|
|
RUN: not llvm-readobj %p/Inputs/corrupt-version.elf-x86_64 -dt \
|
|
|
|
RUN: 2>&1 | FileCheck --check-prefix=VER %s
|
|
|
|
|
|
|
|
VER: Error reading file: Invalid data was encountered while parsing the file.
|
2015-07-20 11:38:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
// The file is missing the dynamic string table but has references to it.
|
|
|
|
RUN: not llvm-readobj -dynamic-table %p/Inputs/corrupt-invalid-strtab.elf.x86-64 \
|
|
|
|
RUN: 2>&1 | FileCheck --check-prefix=STRTAB %s
|
|
|
|
|
|
|
|
STRTAB: Invalid dynamic string table reference
|