Put in the symbol table symbols only used in a .globl statement.

Fixes PR9292.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126330 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2011-02-23 20:22:07 +00:00
parent d04b4937d1
commit 21451e533f
2 changed files with 31 additions and 1 deletions

View File

@@ -833,7 +833,11 @@ static bool isInSymtab(const MCAssembler &Asm, const MCSymbolData &Data,
return true;
const MCSymbol &A = Symbol.AliasedSymbol();
if (!A.isVariable() && A.isUndefined() && !Data.isCommon())
if (Symbol.isVariable() && !A.isVariable() && A.isUndefined())
return false;
bool IsGlobal = GetBinding(Data) == ELF::STB_GLOBAL;
if (!Symbol.isVariable() && Symbol.isUndefined() && !IsGlobal)
return false;
if (!Asm.isSymbolLinkerVisible(Symbol) && !Symbol.isUndefined())