blob: 0a655704610cdd74d2f0e521e7e554e579b5fe98 [file] [log] [blame]
Michael J. Spencer126973b2013-08-08 22:27:13 +00001// 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
Rafael Espindolac46ffb72015-07-20 03:31:25 +00005SECNAME: Error reading file: Invalid data was encountered while parsing the file.
6
7
Michael J. Spencer126973b2013-08-08 22:27:13 +00008// 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
Rafael Espindolac46ffb72015-07-20 03:31:25 +000012SECDATA: Error reading file: Invalid data was encountered while parsing the file.
13
14
Michael J. Spencer126973b2013-08-08 22:27:13 +000015// 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
Rafael Espindolac46ffb72015-07-20 03:31:25 +000019SYMNAME: Error reading file: Invalid data was encountered while parsing the file.
20
21
Michael J. Spencer126973b2013-08-08 22:27:13 +000022// 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
Michael J. Spencer126973b2013-08-08 22:27:13 +000026VER: Error reading file: Invalid data was encountered while parsing the file.