aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/MCDwarf.cpp')
-rw-r--r--lib/MC/MCDwarf.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp
index 0916b054eb..194c324ab6 100644
--- a/lib/MC/MCDwarf.cpp
+++ b/lib/MC/MCDwarf.cpp
@@ -297,17 +297,14 @@ void MCDwarfFileTable::Emit(MCStreamer *MCOS,
}
if (TextSection && MCLineSectionOrder.begin() == MCLineSectionOrder.end()) {
- // Emit dummy entry if line table is empty.
-
- MCOS->SwitchSection(TextSection);
- MCSymbol *SectionEnd = MCOS->getContext().CreateTempSymbol();
- // Set the value of the symbol, as we are at the end of the section.
- MCOS->EmitLabel(SectionEnd);
-
- // Switch back the the dwarf line section.
- MCOS->SwitchSection(DwarfLineSection);
-
- MCOS->EmitDwarfAdvanceLineAddr(INT64_MAX, NULL, SectionEnd);
+ // The darwin9 linker has a bug (see PR8715). For for 32-bit architectures
+ // it requires:
+ // total_length >= prologue_length + 10
+ // We are 4 bytes short, since we have total_length = 51 and
+ // prologue_length = 45
+
+ // The regular end_sequence should be sufficient.
+ MCDwarfLineAddr::Emit(MCOS, INT64_MAX, 0);
}
// This is the end of the section, so set the value of the symbol at the end