/// the section the Language Specific Data Area information is emitted to.
const MCSection *LSDASection;
+ /// EHFrameSection - If exception handling is supported by the target, this is
+ /// the section the EH Frame is emitted to.
+ const MCSection *EHFrameSection;
+
+
public:
// FIXME: NONPUB.
const MCSection *getOrCreateSection(const char *Name,
const MCSection *getStaticCtorSection() const { return StaticCtorSection; }
const MCSection *getStaticDtorSection() const { return StaticDtorSection; }
const MCSection *getLSDASection() const { return LSDASection; }
-
+ const MCSection *getEHFrameSection() const { return EHFrameSection; }
+
/// shouldEmitUsedDirectiveFor - This hook allows targets to selectively
/// decide not to emit the UsedDirective for some symbols in llvm.used.
/// FIXME: REMOVE this (rdar://7071300)
TD->getPointerSize() : -TD->getPointerSize();
// Begin eh frame section.
- Asm->SwitchToTextSection(TAI->getDwarfEHFrameSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getEHFrameSection());
if (TAI->is_EHSymbolPrivate())
O << TAI->getPrivateGlobalPrefix();
const Function *TheFunc = EHFrameInfo.function;
- Asm->SwitchToTextSection(TAI->getDwarfEHFrameSection());
+ Asm->SwitchToSection(Asm->getObjFileLowering().getEHFrameSection());
// Externally visible entry into the functions eh frame info. If the
// corresponding function is static, this should not be externally visible.
UsedDirective = "\t.no_dead_strip\t";
SupportsExceptionHandling = true;
- DwarfEHFrameSection =
- ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
GlobalEHDirective = "\t.globl\t";
SupportsWeakOmittedEHFrame = false;
}
if (!TM.getSubtargetImpl()->isPPC64())
SupportsExceptionHandling = true;
AbsoluteEHSectionOffsets = false;
- DwarfEHFrameSection = "\t.section\t.eh_frame,\"aw\",@progbits";
}
DwarfARangesSection = ".debug_aranges";
DwarfRangesSection = ".debug_ranges";
DwarfMacroInfoSection = ".debug_macinfo";
- DwarfEHFrameSection = ".eh_frame";
AsmTransCBE = 0;
}
StaticCtorSection = 0;
StaticDtorSection = 0;
LSDASection = 0;
+ EHFrameSection = 0;
}
TargetLoweringObjectFile::~TargetLoweringObjectFile() {
// adjusted or this should be a data section.
LSDASection =
getOrCreateSection(".gcc_except_table", false, SectionKind::getReadOnly());
+ EHFrameSection =
+ getOrCreateSection(".eh_frame", false, SectionKind::getDataRel());
}
LSDASection = getOrCreateSection("__DATA,__gcc_except_tab", false,
SectionKind::getDataRel());
+ EHFrameSection =
+ getOrCreateSection("__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms"
+ "+live_support", false, SectionKind::getReadOnly());
}
const MCSection *TargetLoweringObjectFileMachO::
GlobalEHDirective = "\t.globl\t";
SupportsWeakOmittedEHFrame = false;
AbsoluteEHSectionOffsets = false;
- DwarfEHFrameSection =
- ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
}
X86ELFTargetAsmInfo::X86ELFTargetAsmInfo(const X86TargetMachine &TM) :
// Exceptions handling
SupportsExceptionHandling = true;
AbsoluteEHSectionOffsets = false;
- DwarfEHFrameSection = "\t.section\t.eh_frame,\"aw\",@progbits";
// On Linux we must declare when we can use a non-executable stack.
if (TM.getSubtarget<X86Subtarget>().isLinux())