///
bool FDEEncodingRequiresSData4; // Defaults to true
+ /// NonLocalEHFrameLabel - If set, the EH_frame label needs to be non-local.
+ ///
+ bool NonLocalEHFrameLabel; // Defaults to false.
+
/// GlobalEHDirective - This is the directive used to make exception frame
/// tables globally visible.
///
bool doesFDEEncodingRequireSData4() const {
return FDEEncodingRequiresSData4;
}
+ bool doesRequireNonLocalEHFrameLabel() const {
+ return NonLocalEHFrameLabel;
+ }
const char *getGlobalEHDirective() const {
return GlobalEHDirective;
}
// Begin eh frame section.
Asm->SwitchToTextSection(TAI->getDwarfEHFrameSection());
- O << TAI->getEHGlobalPrefix() << "EH_frame" << Index << ":\n";
+
+ if (!TAI->doesRequireNonLocalEHFrameLabel())
+ O << TAI->getEHGlobalPrefix();
+ O << "EH_frame" << Index << ":\n";
EmitLabel("section_eh_frame", Index);
// Define base labels.
EmitLabel("eh_frame_begin", EHFrameInfo.Number);
- EmitSectionOffset("eh_frame_begin", "eh_frame_common",
- EHFrameInfo.Number, EHFrameInfo.PersonalityIndex,
- true, true, false);
+ if (TAI->doesRequireNonLocalEHFrameLabel()) {
+ PrintRelDirective(true, true);
+ PrintLabelName("eh_frame_begin", EHFrameInfo.Number);
+
+ if (!TAI->isAbsoluteEHSectionOffsets())
+ O << "-EH_frame" << EHFrameInfo.PersonalityIndex;
+ } else {
+ EmitSectionOffset("eh_frame_begin", "eh_frame_common",
+ EHFrameInfo.Number, EHFrameInfo.PersonalityIndex,
+ true, true, false);
+ }
+
Asm->EOL("FDE CIE offset");
EmitReference("eh_func_begin", EHFrameInfo.Number, true, true);
SupportsExceptionHandling = false;
DwarfRequiresFrameSection = true;
FDEEncodingRequiresSData4 = true;
+ NonLocalEHFrameLabel = false;
GlobalEHDirective = 0;
SupportsWeakOmittedEHFrame = true;
DwarfSectionOffsetDirective = 0;
HasDotTypeDotSizeDirective = false;
HasSingleParameterDotFile = false;
FDEEncodingRequiresSData4 = false;
+ NonLocalEHFrameLabel = true;
if (TM.getRelocationModel() == Reloc::Static) {
StaticCtorsSection = ".constructor";
StaticDtorsSection = ".destructor";