mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 20:33:15 +00:00
llvm-mc: Tweak undefined symbol handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79898 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a719291db
commit
50e48b359e
@ -294,7 +294,7 @@ public:
|
||||
// FIXME: Set private external bit.
|
||||
|
||||
// Set external bit.
|
||||
if (MSD.SymbolData->isExternal())
|
||||
if (MSD.SymbolData->isExternal() || Symbol.isUndefined())
|
||||
Type |= STF_External;
|
||||
|
||||
// struct nlist (12 bytes)
|
||||
@ -339,7 +339,7 @@ public:
|
||||
ie = Asm.symbol_end(); it != ie; ++it) {
|
||||
MCSymbol &Symbol = it->getSymbol();
|
||||
|
||||
if (!it->isExternal())
|
||||
if (!it->isExternal() && !Symbol.isUndefined())
|
||||
continue;
|
||||
|
||||
uint64_t &Entry = StringIndexMap[Symbol.getName()];
|
||||
@ -371,7 +371,7 @@ public:
|
||||
ie = Asm.symbol_end(); it != ie; ++it) {
|
||||
MCSymbol &Symbol = it->getSymbol();
|
||||
|
||||
if (it->isExternal())
|
||||
if (it->isExternal() || Symbol.isUndefined())
|
||||
continue;
|
||||
|
||||
uint64_t &Entry = StringIndexMap[Symbol.getName()];
|
||||
@ -385,7 +385,6 @@ public:
|
||||
MSD.SymbolData = it;
|
||||
MSD.StringIndex = Entry;
|
||||
|
||||
assert(!Symbol.isUndefined() && "Local symbol can not be undefined!");
|
||||
if (Symbol.isAbsolute()) {
|
||||
MSD.SectionIndex = 0;
|
||||
LocalSymbolData.push_back(MSD);
|
||||
|
Loading…
x
Reference in New Issue
Block a user