/// ReadOnlySection - This is the directive that is emitted to switch to a
/// read-only section for constant data (e.g. data declared const,
/// jump tables).
- const char *ReadOnlySection; // Defaults to NULL
- const Section *ReadOnlySection_;
+ const Section *ReadOnlySection; // Defaults to NULL
/// SmallDataSection - This is the directive that is emitted to switch to a
/// small data section.
const Section *getBSSSection_() const {
return BSSSection_;
}
- const char *getReadOnlySection() const {
+ const Section *getReadOnlySection() const {
return ReadOnlySection;
}
- const Section *getReadOnlySection_() const {
- return ReadOnlySection_;
- }
const Section *getSmallDataSection() const {
return SmallDataSection;
}
ProtectedDirective = NULL;
JumpTableDataSection = ".const";
CStringSection = "\t.cstring";
- ReadOnlySection = "\t.const\n";
HasDotTypeDotSizeDirective = false;
NeedsIndirectEncoding = true;
if (TM.getRelocationModel() == Reloc::Static) {
HasLEB128 = true;
AbsoluteDebugSectionOffsets = true;
CStringSection = ".rodata.str";
- ReadOnlySection = "\t.section\t.rodata\n";
PrivateGlobalPrefix = ".L";
WeakRefDirective = "\t.weak\t";
SetDirective = "\t.set\t";
// there, if needed.
SixteenByteConstantSection = 0;
- ReadOnlySection_ = getUnnamedSection("\t.const\n", SectionFlags::None);
+ ReadOnlySection = getUnnamedSection("\t.const\n", SectionFlags::None);
TextCoalSection =
getNamedSection("\t__TEXT,__textcoal_nt,coalesced,pure_instructions",
SectionFlags::Code);
- ConstDataCoalSection = getBamedSection("\t__DATA,__const_coal,coalesced",
+ ConstDataCoalSection = getNamedSection("\t__DATA,__const_coal,coalesced",
SectionFlags::None);
ConstDataSection = getUnnamedSection(".const_data", SectionFlags::None);
DataCoalSection = getNamedSection("\t__DATA,__datacoal_nt,coalesced",
return (isWeak ? DataCoalSection : DataSection);
case SectionKind::ROData:
return (isWeak ? ConstDataCoalSection :
- (isNonStatic ? ConstDataSection : getReadOnlySection_()));
+ (isNonStatic ? ConstDataSection : getReadOnlySection()));
case SectionKind::RODataMergeStr:
return (isWeak ?
ConstDataCoalSection :
return getCStringSection_();
}
- return getReadOnlySection_();
+ return getReadOnlySection();
}
const Section*
else if (Size == 16 && SixteenByteConstantSection)
return SixteenByteConstantSection;
- return getReadOnlySection_();
+ return getReadOnlySection();
}
const Section*
const Section* S = MergeableConstSection(Ty);
// Handle weird special case, when compiling PIC stuff.
- if (S == getReadOnlySection_() &&
+ if (S == getReadOnlySection() &&
DTM->getRelocationModel() != Reloc::Static)
return ConstDataSection;
BSSSection_ = getUnnamedSection("\t.bss",
SectionFlags::Writeable | SectionFlags::BSS);
- ReadOnlySection_ = getNamedSection("\t.rodata", SectionFlags::None);
+ ReadOnlySection = getNamedSection("\t.rodata", SectionFlags::None);
TLSDataSection = getNamedSection("\t.tdata",
SectionFlags::Writeable | SectionFlags::TLS);
TLSBSSSection = getNamedSection("\t.tbss",
return getBSSSection_();
case SectionKind::ROData:
case SectionKind::SmallROData:
- return getReadOnlySection_();
+ return getReadOnlySection();
case SectionKind::RODataMergeStr:
return MergeableStringSection(GVar);
case SectionKind::RODataMergeConst:
Size));
}
- return getReadOnlySection_();
+ return getReadOnlySection();
}
const Section*
return getNamedSection(Name.c_str(), Flags);
}
- return getReadOnlySection_();
+ return getReadOnlySection();
}
std::string ELFTargetAsmInfo::printSectionFlags(unsigned flags) const {
PrivateGlobalPrefix = "$";
JumpTableDataSection = "\t.rdata";
CommentString = "#";
- ReadOnlySection = "\t.rdata";
ZeroDirective = "\t.space\t";
BSSSection = "\t.section\t.bss";
CStringSection = ".rodata.str";
if (!Subtarget->hasABICall()) {
JumpTableDirective = "\t.word\t";
SmallDataSection = getNamedSection("\t.sdata", SectionFlags::Writeable);
- SmallBSSSection = getNamedSection("\t.sbss", SectionFlags::Writeable |
+ SmallBSSSection = getNamedSection("\t.sbss",
+ SectionFlags::Writeable |
SectionFlags::BSS);
- } else
+ } else
JumpTableDirective = "\t.gpword\t";
}
ConstantPoolSection = "\t.const\t";
JumpTableDataSection = ".const";
CStringSection = "\t.cstring";
- ReadOnlySection = "\t.const\n";
if (TM.getRelocationModel() == Reloc::Static) {
StaticCtorsSection = ".constructor";
StaticDtorsSection = ".destructor";
DwarfRangesSection = "\t.section\t.debug_ranges,\"\",@progbits";
DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
- ReadOnlySection = "\t.section\t.rodata";
PCSymbol = ".";
// Set up DWARF directives
BSSSection("\t.bss"),
BSSSection_(0),
ReadOnlySection(0),
- ReadOnlySection_(0),
SmallDataSection(0),
SmallBSSSection(0),
SmallRODataSection(0),
return getTextSection();
else if (isBSS(Kind) && getBSSSection_())
return getBSSSection_();
- else if (getReadOnlySection_() && SectionKind::isReadOnly(Kind))
- return getReadOnlySection_();
+ else if (getReadOnlySection() && SectionKind::isReadOnly(Kind))
+ return getReadOnlySection();
}
return getDataSection();
SixteenByteConstantSection = getUnnamedSection("\t.literal16\n",
SectionFlags::Mergeable);
}
- ReadOnlySection = "\t.const\n";
-
LCOMMDirective = "\t.lcomm\t";
SwitchToSectionDirective = "\t.section ";
StringConstantPrefix = "\1LC";
X86ELFTargetAsmInfo::X86ELFTargetAsmInfo(const X86TargetMachine &TM):
X86TargetAsmInfo(TM), ELFTargetAsmInfo(TM) {
- ReadOnlySection = ".rodata";
CStringSection = ".rodata.str";
PrivateGlobalPrefix = ".L";
WeakRefDirective = "\t.weak\t";