mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
Move common symbol related information from MCSectionData to MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238583 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -360,8 +360,8 @@ void ELFObjectWriter::writeHeader(const MCAssembler &Asm) {
|
||||
uint64_t ELFObjectWriter::SymbolValue(const MCSymbol &Sym,
|
||||
const MCAsmLayout &Layout) {
|
||||
MCSymbolData &Data = Sym.getData();
|
||||
if (Data.isCommon() && Data.isExternal())
|
||||
return Data.getCommonAlignment();
|
||||
if (Sym.isCommon() && Data.isExternal())
|
||||
return Sym.getCommonAlignment();
|
||||
|
||||
uint64_t Res;
|
||||
if (!Layout.getSymbolOffset(Sym, Res))
|
||||
@@ -459,7 +459,7 @@ void ELFObjectWriter::writeSymbol(SymbolTableWriter &Writer,
|
||||
|
||||
// This has to be in sync with when computeSymbolTable uses SHN_ABS or
|
||||
// SHN_COMMON.
|
||||
bool IsReserved = !Base || OrigData.isCommon();
|
||||
bool IsReserved = !Base || MSD.Symbol->isCommon();
|
||||
|
||||
// Binding and Type share the same byte as upper and lower nibbles
|
||||
uint8_t Binding = MCELF::GetBinding(OrigData);
|
||||
@@ -832,7 +832,7 @@ void ELFObjectWriter::computeSymbolTable(
|
||||
|
||||
if (Symbol.isAbsolute()) {
|
||||
MSD.SectionIndex = ELF::SHN_ABS;
|
||||
} else if (SD.isCommon()) {
|
||||
} else if (Symbol.isCommon()) {
|
||||
assert(!Local);
|
||||
MSD.SectionIndex = ELF::SHN_COMMON;
|
||||
} else if (Symbol.isUndefined()) {
|
||||
|
Reference in New Issue
Block a user