forked from OSchip/llvm-project
Fix a FIXME: DwarfRequiresRelocationForSectionOffset is the same as
DwarfUsesRelocationsAcrossSections. llvm-svn: 158992
This commit is contained in:
parent
5b01415dc0
commit
d7bdaf5795
|
@ -315,14 +315,8 @@ namespace llvm {
|
||||||
/// DwarfSectionOffsetDirective - Special section offset directive.
|
/// DwarfSectionOffsetDirective - Special section offset directive.
|
||||||
const char* DwarfSectionOffsetDirective; // Defaults to NULL
|
const char* DwarfSectionOffsetDirective; // Defaults to NULL
|
||||||
|
|
||||||
/// DwarfRequiresRelocationForSectionOffset - True if we need to produce a
|
|
||||||
/// relocation when we want a section offset in dwarf.
|
|
||||||
bool DwarfRequiresRelocationForSectionOffset; // Defaults to true;
|
|
||||||
|
|
||||||
/// DwarfUsesRelocationsAcrossSections - True if Dwarf2 output generally
|
/// DwarfUsesRelocationsAcrossSections - True if Dwarf2 output generally
|
||||||
/// uses relocations for references to other .debug_* sections.
|
/// uses relocations for references to other .debug_* sections.
|
||||||
// FIXME: Can we replace DwarfRequiresRelocationForSectionOffset
|
|
||||||
// with this?
|
|
||||||
bool DwarfUsesRelocationsAcrossSections;
|
bool DwarfUsesRelocationsAcrossSections;
|
||||||
|
|
||||||
/// DwarfUsesRelocationsForStringPool - True if this Dwarf output must use
|
/// DwarfUsesRelocationsForStringPool - True if this Dwarf output must use
|
||||||
|
@ -551,9 +545,6 @@ namespace llvm {
|
||||||
const char *getDwarfSectionOffsetDirective() const {
|
const char *getDwarfSectionOffsetDirective() const {
|
||||||
return DwarfSectionOffsetDirective;
|
return DwarfSectionOffsetDirective;
|
||||||
}
|
}
|
||||||
bool doesDwarfRequireRelocationForSectionOffset() const {
|
|
||||||
return DwarfRequiresRelocationForSectionOffset;
|
|
||||||
}
|
|
||||||
bool doesDwarfUseRelocationsAcrossSections() const {
|
bool doesDwarfUseRelocationsAcrossSections() const {
|
||||||
return DwarfUsesRelocationsAcrossSections;
|
return DwarfUsesRelocationsAcrossSections;
|
||||||
}
|
}
|
||||||
|
|
|
@ -566,7 +566,7 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
|
||||||
NewCU->addUInt(Die, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, 0);
|
NewCU->addUInt(Die, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, 0);
|
||||||
// DW_AT_stmt_list is a offset of line number information for this
|
// DW_AT_stmt_list is a offset of line number information for this
|
||||||
// compile unit in debug_line section.
|
// compile unit in debug_line section.
|
||||||
if (Asm->MAI->doesDwarfRequireRelocationForSectionOffset())
|
if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
|
||||||
NewCU->addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4,
|
NewCU->addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4,
|
||||||
Asm->GetTempSymbol("section_line"));
|
Asm->GetTempSymbol("section_line"));
|
||||||
else
|
else
|
||||||
|
|
|
@ -84,7 +84,6 @@ MCAsmInfo::MCAsmInfo() {
|
||||||
SupportsDebugInformation = false;
|
SupportsDebugInformation = false;
|
||||||
ExceptionsType = ExceptionHandling::None;
|
ExceptionsType = ExceptionHandling::None;
|
||||||
DwarfUsesInlineInfoSection = false;
|
DwarfUsesInlineInfoSection = false;
|
||||||
DwarfRequiresRelocationForSectionOffset = true;
|
|
||||||
DwarfSectionOffsetDirective = 0;
|
DwarfSectionOffsetDirective = 0;
|
||||||
DwarfUsesRelocationsAcrossSections = true;
|
DwarfUsesRelocationsAcrossSections = true;
|
||||||
DwarfUsesRelocationsForStringPool = true;
|
DwarfUsesRelocationsForStringPool = true;
|
||||||
|
|
|
@ -59,7 +59,6 @@ MCAsmInfoDarwin::MCAsmInfoDarwin() {
|
||||||
HasNoDeadStrip = true;
|
HasNoDeadStrip = true;
|
||||||
HasSymbolResolver = true;
|
HasSymbolResolver = true;
|
||||||
|
|
||||||
DwarfRequiresRelocationForSectionOffset = false;
|
|
||||||
DwarfUsesRelocationsAcrossSections = false;
|
DwarfUsesRelocationsAcrossSections = false;
|
||||||
DwarfUsesRelocationsForStringPool = false;
|
DwarfUsesRelocationsForStringPool = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -705,7 +705,7 @@ void MCGenDwarfInfo::Emit(MCStreamer *MCOS, const MCSymbol *LineSectionSymbol) {
|
||||||
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfInfoSection());
|
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfInfoSection());
|
||||||
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfAbbrevSection());
|
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfAbbrevSection());
|
||||||
MCSymbol *AbbrevSectionSymbol;
|
MCSymbol *AbbrevSectionSymbol;
|
||||||
if (AsmInfo.doesDwarfRequireRelocationForSectionOffset()) {
|
if (AsmInfo.doesDwarfUseRelocationsAcrossSections()) {
|
||||||
AbbrevSectionSymbol = context.CreateTempSymbol();
|
AbbrevSectionSymbol = context.CreateTempSymbol();
|
||||||
MCOS->EmitLabel(AbbrevSectionSymbol);
|
MCOS->EmitLabel(AbbrevSectionSymbol);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1285,7 +1285,7 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
|
||||||
0);
|
0);
|
||||||
if (verboseAsm) streamer.AddComment("FDE CIE Offset");
|
if (verboseAsm) streamer.AddComment("FDE CIE Offset");
|
||||||
streamer.EmitAbsValue(offset, 4);
|
streamer.EmitAbsValue(offset, 4);
|
||||||
} else if (!asmInfo.doesDwarfRequireRelocationForSectionOffset()) {
|
} else if (!asmInfo.doesDwarfUseRelocationsAcrossSections()) {
|
||||||
const MCExpr *offset = MakeStartMinusEndExpr(streamer, *SectionStart,
|
const MCExpr *offset = MakeStartMinusEndExpr(streamer, *SectionStart,
|
||||||
cieStart, 0);
|
cieStart, 0);
|
||||||
streamer.EmitAbsValue(offset, 4);
|
streamer.EmitAbsValue(offset, 4);
|
||||||
|
|
Loading…
Reference in New Issue