[obj2yaml] Don't crash for input files without symbol table
authorAlexander Richardson <arichardson.kde@gmail.com>
Fri, 22 Sep 2017 09:30:40 +0000 (09:30 +0000)
committerAlexander Richardson <arichardson.kde@gmail.com>
Fri, 22 Sep 2017 09:30:40 +0000 (09:30 +0000)
commitc46750ef42dd32908a55ebafb71845f0b9d67b49
treeb7b00b7b6532b8ca11eebab2517655cd22e3ff02
parent8f719bacd00e4a860a7c67d6e77170f7a8605ec6
[obj2yaml] Don't crash for input files without symbol table

Summary: Previously we would dereference Symtab without checking for null.

Reviewers: davide, atanasyan, rafael

Reviewed By: davide, atanasyan

Differential Revision: https://reviews.llvm.org/D38080

llvm-svn: 313970
llvm/test/tools/obj2yaml/Inputs/crt1.o [new file with mode: 0755]
llvm/test/tools/obj2yaml/missing_symtab.test [new file with mode: 0644]
llvm/tools/obj2yaml/elf2yaml.cpp