summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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