[Object][ELF] Fix crash on no dynamic section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174639 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Object/readobj.test b/test/Object/readobj.test
new file mode 100644
index 0000000..e29f404
--- /dev/null
+++ b/test/Object/readobj.test
@@ -0,0 +1,2 @@
+// Don't crash while reading non-dynamic files.
+RUN: llvm-readobj %p/Inputs/trivial-object-test.elf-x86-64