mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Implement more alias cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115699 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -807,9 +807,20 @@ void ELFObjectWriterImpl::ComputeSymbolTable(MCAssembler &Asm) {
|
||||
MSD.SymbolData = it;
|
||||
MSD.StringIndex = Entry;
|
||||
|
||||
// FIXME: There is duplicated code with the local case.
|
||||
if (it->isCommon()) {
|
||||
MSD.SectionIndex = ELF::SHN_COMMON;
|
||||
ExternalSymbolData.push_back(MSD);
|
||||
} else if (Symbol.isVariable()) {
|
||||
const MCExpr *Value = Symbol.getVariableValue();
|
||||
assert (Value->getKind() == MCExpr::SymbolRef && "Unimplemented");
|
||||
const MCSymbolRefExpr *Ref = static_cast<const MCSymbolRefExpr*>(Value);
|
||||
const MCSymbol &RefSymbol = Ref->getSymbol();
|
||||
if (RefSymbol.isDefined()) {
|
||||
MSD.SectionIndex = SectionIndexMap.lookup(&RefSymbol.getSection());
|
||||
assert(MSD.SectionIndex && "Invalid section index!");
|
||||
ExternalSymbolData.push_back(MSD);
|
||||
}
|
||||
} else if (Symbol.isUndefined()) {
|
||||
MSD.SectionIndex = ELF::SHN_UNDEF;
|
||||
// FIXME: Undefined symbols are global, but this is the first place we
|
||||
|
Reference in New Issue
Block a user