stuff to emit optimal nops in the right places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97233
91177308-0d34-0410-b5e6-
96231b3b80d8
return Error(Loc, ErrorStr.c_str());
// FIXME: Arch specific.
return Error(Loc, ErrorStr.c_str());
// FIXME: Arch specific.
+ bool isText = Segment == "__TEXT"; // FIXME: Hack.
Out.SwitchSection(getMachOSection(Segment, Section, TAA, StubSize,
Out.SwitchSection(getMachOSection(Segment, Section, TAA, StubSize,
+ isText ? SectionKind::getText()
+ : SectionKind::getDataRel()));
Lex();
// FIXME: Arch specific.
Lex();
// FIXME: Arch specific.
+ bool isText = StringRef(Segment) == "__TEXT"; // FIXME: Hack.
Out.SwitchSection(getMachOSection(Segment, Section, TAA, StubSize,
Out.SwitchSection(getMachOSection(Segment, Section, TAA, StubSize,
+ isText ? SectionKind::getText()
+ : SectionKind::getDataRel()));
// Set the implicit alignment, if any.
//
// Set the implicit alignment, if any.
//
if (IsLocal) {
Out.EmitZerofill(getMachOSection("__DATA", "__bss",
MCSectionMachO::S_ZEROFILL, 0,
if (IsLocal) {
Out.EmitZerofill(getMachOSection("__DATA", "__bss",
MCSectionMachO::S_ZEROFILL, 0,
+ SectionKind::getBSS()),
Sym, Size, 1 << Pow2Alignment);
return false;
}
Sym, Size, 1 << Pow2Alignment);
return false;
}
// Create the zerofill section but no symbol
Out.EmitZerofill(getMachOSection(Segment, Section,
MCSectionMachO::S_ZEROFILL, 0,
// Create the zerofill section but no symbol
Out.EmitZerofill(getMachOSection(Segment, Section,
MCSectionMachO::S_ZEROFILL, 0,
+ SectionKind::getBSS()));
// FIXME: Arch specific.
Out.EmitZerofill(getMachOSection(Segment, Section,
MCSectionMachO::S_ZEROFILL, 0,
// FIXME: Arch specific.
Out.EmitZerofill(getMachOSection(Segment, Section,
MCSectionMachO::S_ZEROFILL, 0,
+ SectionKind::getBSS()),
Sym, Size, 1 << Pow2Alignment);
return false;
Sym, Size, 1 << Pow2Alignment);
return false;