mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
ELF_STB_Local is 0 so setting and checking it must be done specially
llvm-svn: 113375
This commit is contained in:
parent
c7dd9d3840
commit
c0f16ab31a
@ -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