forked from OSchip/llvm-project
Don't crash on files with no symbol table.
Thanks to Roman Divacky for the test. llvm-svn: 249066
This commit is contained in:
parent
a602a153de
commit
3e60379fd9
|
@ -78,6 +78,8 @@ ELFData<ELFT>::getSymbolsHelper(bool Local) {
|
|||
}
|
||||
|
||||
template <class ELFT> void ELFData<ELFT>::initStringTable() {
|
||||
if (!Symtab)
|
||||
return;
|
||||
ErrorOr<StringRef> StringTableOrErr = ELFObj.getStringTableForSymtab(*Symtab);
|
||||
error(StringTableOrErr.getError());
|
||||
StringTable = *StringTableOrErr;
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
||||
// RUN: lld -flavor gnu2 %t.o %p/Inputs/no-symtab.o -o %t
|
||||
.global _start
|
||||
_start:
|
Loading…
Reference in New Issue