Michael J. Spencer | 126973b | 2013-08-08 22:27:13 +0000 | [diff] [blame] | 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 |
| 4 | |
Rafael Espindola | c46ffb7 | 2015-07-20 03:31:25 +0000 | [diff] [blame^] | 5 | SECNAME: Error reading file: Invalid data was encountered while parsing the file. |
| 6 | |
| 7 | |
Michael J. Spencer | 126973b | 2013-08-08 22:27:13 +0000 | [diff] [blame] | 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 |
| 11 | |
Rafael Espindola | c46ffb7 | 2015-07-20 03:31:25 +0000 | [diff] [blame^] | 12 | SECDATA: Error reading file: Invalid data was encountered while parsing the file. |
| 13 | |
| 14 | |
Michael J. Spencer | 126973b | 2013-08-08 22:27:13 +0000 | [diff] [blame] | 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 |
| 18 | |
Rafael Espindola | c46ffb7 | 2015-07-20 03:31:25 +0000 | [diff] [blame^] | 19 | SYMNAME: Error reading file: Invalid data was encountered while parsing the file. |
| 20 | |
| 21 | |
Michael J. Spencer | 126973b | 2013-08-08 22:27:13 +0000 | [diff] [blame] | 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 |
| 25 | |
Michael J. Spencer | 126973b | 2013-08-08 22:27:13 +0000 | [diff] [blame] | 26 | VER: Error reading file: Invalid data was encountered while parsing the file. |