summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-06-30 18:23:07 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-06-30 18:23:07 +0000
commit0fe34f73590ada4b7584ba643bee7e0e704d1f08 (patch)
treedcff362a0c6b89b04c50828c47366f32ef51d444 /llvm/test
parentf09df00daad64a809204cd12ed47c3d81e25652d (diff)
downloadbcm5719-llvm-0fe34f73590ada4b7584ba643bee7e0e704d1f08.tar.gz
bcm5719-llvm-0fe34f73590ada4b7584ba643bee7e0e704d1f08.zip
Add a test of an elf file with an invalid section index.
We were already checking, but were missing a test. llvm-svn: 241094
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Object/Inputs/invalid-section-index.elfbin0 -> 536 bytes
-rw-r--r--llvm/test/Object/invalid.test4
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/Object/Inputs/invalid-section-index.elf b/llvm/test/Object/Inputs/invalid-section-index.elf
new file mode 100644
index 00000000000..a019d8a5479
--- /dev/null
+++ b/llvm/test/Object/Inputs/invalid-section-index.elf
Binary files differ
diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test
index 88685fab20c..32598691de4 100644
--- a/llvm/test/Object/invalid.test
+++ b/llvm/test/Object/invalid.test
@@ -37,3 +37,7 @@ SECTION-NEXT: EntrySize: 32
RUN: not llvm-readobj -t %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-SYM-SIZE %s
RUN: not llvm-readobj --dyn-symbols %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-SYM-SIZE %s
INVALID-SYM-SIZE: Invalid symbol size
+
+RUN: not llvm-readobj -t %p/Inputs/invalid-section-index.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-INDEX %s
+
+INVALID-SECTION-INDEX: Invalid section index!
OpenPOWER on IntegriCloud