Fix ELF parsing where undefined symbols were being added to the symbol table with the incorrect symbol type.

llvm-svn: 174984
This commit is contained in:
Matt Kopec 2013-02-12 18:30:30 +00:00
parent f72d06a919
commit 92dd5cfe04
1 changed files with 30 additions and 26 deletions

View File

@ -750,6 +750,9 @@ ParseSymbols(Symtab *symtab,
break;
}
// If a symbol is undefined do not process it further even if it has a STT type
if (symbol_type != eSymbolTypeUndefined)
{
switch (symbol.getType())
{
default:
@ -782,6 +785,7 @@ ParseSymbols(Symtab *symtab,
symbol_type = eSymbolTypeObjectFile;
break;
}
}
if (symbol_type == eSymbolTypeInvalid)
{