diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-08-08 22:27:13 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-08-08 22:27:13 +0000 |
commit | 081a1941b595f6294e4ce678fd61ef56a2ceb51e (patch) | |
tree | 45ac82225774a2894de7e3e4c4a83e5cf2d90dd5 /test | |
parent | 491d04969d9f29ed891c73238648853954ba4f81 (diff) | |
download | external_llvm-081a1941b595f6294e4ce678fd61ef56a2ceb51e.zip external_llvm-081a1941b595f6294e4ce678fd61ef56a2ceb51e.tar.gz external_llvm-081a1941b595f6294e4ce678fd61ef56a2ceb51e.tar.bz2 |
[Object] Split the ELF interface into 3 parts.
* ELFTypes.h contains template magic for defining types based on endianess, size, and alignment.
* ELFFile.h defines the ELFFile class which provides low level ELF specific access.
* ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Object/Inputs/corrupt-version.elf-x86_64 | bin | 0 -> 5200 bytes | |||
-rw-r--r-- | test/Object/Inputs/corrupt.elf-x86-64 | bin | 0 -> 1024 bytes | |||
-rw-r--r-- | test/Object/corrupt.test | 24 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test/Object/Inputs/corrupt-version.elf-x86_64 b/test/Object/Inputs/corrupt-version.elf-x86_64 Binary files differnew file mode 100644 index 0000000..1241a27 --- /dev/null +++ b/test/Object/Inputs/corrupt-version.elf-x86_64 diff --git a/test/Object/Inputs/corrupt.elf-x86-64 b/test/Object/Inputs/corrupt.elf-x86-64 Binary files differnew file mode 100644 index 0000000..8ae5f17 --- /dev/null +++ b/test/Object/Inputs/corrupt.elf-x86-64 diff --git a/test/Object/corrupt.test b/test/Object/corrupt.test new file mode 100644 index 0000000..ef72a09 --- /dev/null +++ b/test/Object/corrupt.test @@ -0,0 +1,24 @@ +// 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 + +// 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 + +// 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 + +// 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 + +SECNAME: Error reading file: Invalid data was encountered while parsing the file. + +SECDATA: Error reading file: Invalid data was encountered while parsing the file. +SECDATA: Error reading file: Invalid data was encountered while parsing the file. + +SYMNAME: Error reading file: Invalid data was encountered while parsing the file. + +VER: Error reading file: Invalid data was encountered while parsing the file. |