On elf, undefined symbols can start with .L.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114958 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2010-09-28 16:19:11 +00:00
parent c577c271b1
commit 53725bc57a
2 changed files with 19 additions and 1 deletions

View File

@@ -689,12 +689,15 @@ void ELFObjectWriterImpl::ComputeSymbolTable(MCAssembler &Asm) {
const MCSymbol &Symbol = it->getSymbol();
// Ignore non-linker visible symbols.
if (!Asm.isSymbolLinkerVisible(Symbol))
if (!Asm.isSymbolLinkerVisible(Symbol) && !Symbol.isUndefined())
continue;
if (!it->isExternal() && !Symbol.isUndefined())
continue;
if (Symbol.isVariable())
continue;
uint64_t &Entry = StringIndexMap[Symbol.getName()];
if (!Entry) {
Entry = StringTable.size();