/// TextSection - Section directive for standard text.
///
- const Section *TextSection; // Defaults to ".text".
+ const Section *TextSection; // Defaults to ".text".
/// DataSection - Section directive for standard data.
///
- const char *DataSection; // Defaults to ".data".
- const Section *DataSection_;
+ const Section *DataSection; // Defaults to ".data".
/// BSSSection - Section directive for uninitialized data. Null if this
/// target doesn't support a BSS section.
const Section *getTextSection() const {
return TextSection;
}
- const char *getDataSection() const {
+ const Section *getDataSection() const {
return DataSection;
}
- const Section *getDataSection_() const {
- return DataSection_;
- }
const char *getBSSSection() const {
return BSSSection;
}
Asm->SwitchToSection(TAI->getTextSection());
EmitLabel("text_begin", 0);
- Asm->SwitchToDataSection(TAI->getDataSection());
+ Asm->SwitchToSection(TAI->getDataSection());
EmitLabel("data_begin", 0);
}
// Standard sections final addresses.
Asm->SwitchToSection(TAI->getTextSection());
EmitLabel("text_end", 0);
- Asm->SwitchToDataSection(TAI->getDataSection());
+ Asm->SwitchToSection(TAI->getDataSection());
EmitLabel("data_end", 0);
// End text sections.
AP.SwitchToSection(TAI.getTextSection());
EmitCamlGlobal(getModule(), OS, AP, TAI, "code_begin");
- AP.SwitchToDataSection(TAI.getDataSection());
+ AP.SwitchToSection(TAI.getDataSection());
EmitCamlGlobal(getModule(), OS, AP, TAI, "data_begin");
}
AP.SwitchToSection(TAI.getTextSection());
EmitCamlGlobal(getModule(), OS, AP, TAI, "code_end");
- AP.SwitchToDataSection(TAI.getDataSection());
+ AP.SwitchToSection(TAI.getDataSection());
EmitCamlGlobal(getModule(), OS, AP, TAI, "data_end");
OS << AddressDirective << 0; // FIXME: Why does ocaml emit this??
AP.EOL();
- AP.SwitchToDataSection(TAI.getDataSection());
+ AP.SwitchToSection(TAI.getDataSection());
EmitCamlGlobal(getModule(), OS, AP, TAI, "frametable");
for (iterator I = begin(), IE = end(); I != IE; ++I) {
AlignmentIsInBytes = false;
Data64bitsDirective = 0;
CommentString = "@";
- DataSection = "\t.data";
ConstantPoolSection = "\t.text\n";
COMMDirectiveTakesAlignment = false;
InlineAsmStart = "@ InlineAsm Start";
if (cast<GlobalVariable>(GV)->isConstant())
return (isWeak ? ConstDataCoalSection : ConstDataSection);
else
- return (isWeak ? DataCoalSection : getDataSection_());
+ return (isWeak ? DataCoalSection : getDataSection());
case SectionKind::ROData:
return (isWeak ? ConstDataCoalSection :
(isNonStatic ? ConstDataSection : getReadOnlySection_()));
ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM) {
ETM = &TM;
- DataSection_ = getUnnamedSection("\t.data", SectionFlags::Writeable);
BSSSection_ = getUnnamedSection("\t.bss",
SectionFlags::Writeable | SectionFlags::BSS);
ReadOnlySection_ = getNamedSection("\t.rodata", SectionFlags::None);
switch (Kind) {
case SectionKind::Data:
case SectionKind::SmallData:
- return getDataSection_();
+ return getDataSection();
case SectionKind::BSS:
case SectionKind::SmallBSS:
// ELF targets usually have BSS sections
TargetAsmInfo::TargetAsmInfo() :
TextSection(0),
- DataSection("\t.data"),
- DataSection_(0),
+ DataSection(0),
BSSSection("\t.bss"),
BSSSection_(0),
ReadOnlySection(0),
DwarfExceptionSection(".gcc_except_table"),
AsmTransCBE(0) {
TextSection = getUnnamedSection("\t.text", SectionFlags::Code);
- DataSection_ = getUnnamedSection(DataSection);
+ DataSection = getUnnamedSection("\t.data", SectionFlags::Writeable);
}
TargetAsmInfo::~TargetAsmInfo() {
return getReadOnlySection_();
}
- return getDataSection_();
+ return getDataSection();
}
// Lame default implementation. Calculate the section name for machine const.
const Section*
TargetAsmInfo::SelectSectionForMachineConst(const Type *Ty) const {
// FIXME: Support data.rel stuff someday
- return getDataSection_();
+ return getDataSection();
}
std::string
O << "\tpublic " << name << "\n";
// FALL THROUGH
case GlobalValue::InternalLinkage:
- SwitchToDataSection(TAI->getDataSection(), I);
+ SwitchToSection(TAI->getDataSection());
break;
default:
assert(0 && "Unknown linkage type!");
HasDotTypeDotSizeDirective = false;
TextSection = getUnnamedSection("_text", SectionFlags::Code);
- DataSection = "_data";
+ DataSection = getUnnamedSection("_data", SectionFlags::Writeable);
+
JumpTableDataSection = NULL;
SwitchToSectionDirective = "";
TextSectionStartSuffix = "\tsegment 'CODE'";