mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
ELF_STB_Local is 0 so setting and checking it must be done specially
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
30268be89d
commit
b629dcca72
@ -439,7 +439,7 @@ void ELFObjectWriterImpl::WriteSymbolTable(MCDataFragment *F,
|
||||
assert((Data.getFlags() & ELF_STB_Global) &&
|
||||
"External symbol requires STB_GLOBAL flag");
|
||||
WriteSymbol(F, MSD, Layout);
|
||||
if (Data.getFlags() & ELF_STB_Local)
|
||||
if ((Data.getFlags() & (0xf << ELF_STB_Shift)) == ELF_STB_Local)
|
||||
LastLocalSymbolIndex++;
|
||||
}
|
||||
|
||||
@ -448,7 +448,7 @@ void ELFObjectWriterImpl::WriteSymbolTable(MCDataFragment *F,
|
||||
MCSymbolData &Data = *MSD.SymbolData;
|
||||
Data.setFlags(Data.getFlags() | ELF_STB_Global);
|
||||
WriteSymbol(F, MSD, Layout);
|
||||
if (Data.getFlags() & ELF_STB_Local)
|
||||
if ((Data.getFlags() & (0xf << ELF_STB_Shift)) == ELF_STB_Local)
|
||||
LastLocalSymbolIndex++;
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +196,9 @@ void MCELFStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
|
||||
break;
|
||||
|
||||
case MCSA_Local:
|
||||
SD.setFlags(SD.getFlags() | ELF_STB_Local);
|
||||
// ELF_STB_Local is 0, so zero the ELF_STB area
|
||||
// SD.getFlags() | ELF_STB_Local is a NOP
|
||||
SD.setFlags(SD.getFlags() & ~(0xf << ELF_STB_Shift));
|
||||
break;
|
||||
|
||||
case MCSA_ELF_TypeFunction:
|
||||
|
Loading…
Reference in New Issue
Block a user