mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
llvm-mc: Unique zero fill sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80342 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1287,15 +1287,10 @@ bool AsmParser::ParseDirectiveDarwinZerofill() {
|
|||||||
// If this is the end of the line all that was wanted was to create the
|
// If this is the end of the line all that was wanted was to create the
|
||||||
// the section but with no symbol.
|
// the section but with no symbol.
|
||||||
if (Lexer.is(AsmToken::EndOfStatement)) {
|
if (Lexer.is(AsmToken::EndOfStatement)) {
|
||||||
// FIXME: CACHE THIS.
|
|
||||||
MCSection *S = 0; //Ctx.GetSection(Section);
|
|
||||||
if (S == 0)
|
|
||||||
S = MCSectionMachO::Create(Segment, Section,
|
|
||||||
MCSectionMachO::S_ZEROFILL, 0,
|
|
||||||
SectionKind(), Ctx);
|
|
||||||
|
|
||||||
// Create the zerofill section but no symbol
|
// Create the zerofill section but no symbol
|
||||||
Out.EmitZerofill(S);
|
Out.EmitZerofill(getMachOSection(Segment, Section,
|
||||||
|
MCSectionMachO::S_ZEROFILL, 0,
|
||||||
|
SectionKind()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1348,16 +1343,13 @@ bool AsmParser::ParseDirectiveDarwinZerofill() {
|
|||||||
if (!Sym->isUndefined())
|
if (!Sym->isUndefined())
|
||||||
return Error(IDLoc, "invalid symbol redefinition");
|
return Error(IDLoc, "invalid symbol redefinition");
|
||||||
|
|
||||||
// FIXME: Arch specific.
|
|
||||||
// FIXME: CACHE.
|
|
||||||
MCSection *S = 0; //Ctx.GetSection(Section);
|
|
||||||
if (S == 0)
|
|
||||||
S = MCSectionMachO::Create(Segment, Section,
|
|
||||||
MCSectionMachO::S_ZEROFILL, 0,
|
|
||||||
SectionKind(), Ctx);
|
|
||||||
|
|
||||||
// Create the zerofill Symbol with Size and Pow2Alignment
|
// Create the zerofill Symbol with Size and Pow2Alignment
|
||||||
Out.EmitZerofill(S, Sym, Size, Pow2Alignment);
|
//
|
||||||
|
// FIXME: Arch specific.
|
||||||
|
Out.EmitZerofill(getMachOSection(Segment, Section,
|
||||||
|
MCSectionMachO::S_ZEROFILL, 0,
|
||||||
|
SectionKind()),
|
||||||
|
Sym, Size, Pow2Alignment);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user