mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-27 02:31:09 +00:00
First step in fixing MC. Make it clear that we are avoiding a bug in the
darwin9 linker, what is needed to avoid it and where to get more information. Also make the workaround simpler. Just the regular end_sequence we normally create is more than 4 bytes. Tested by building cctools and ld64 from darwin9 on a darwin10 system and using those. I checked that I was able to reproduce the bootstrap failure when the the workaround was disabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120854 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ddb85acdbe
commit
a8de83c68a
@ -297,17 +297,14 @@ void MCDwarfFileTable::Emit(MCStreamer *MCOS,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (TextSection && MCLineSectionOrder.begin() == MCLineSectionOrder.end()) {
|
if (TextSection && MCLineSectionOrder.begin() == MCLineSectionOrder.end()) {
|
||||||
// Emit dummy entry if line table is empty.
|
// 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
|
||||||
|
|
||||||
MCOS->SwitchSection(TextSection);
|
// The regular end_sequence should be sufficient.
|
||||||
MCSymbol *SectionEnd = MCOS->getContext().CreateTempSymbol();
|
MCDwarfLineAddr::Emit(MCOS, INT64_MAX, 0);
|
||||||
// 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is the end of the section, so set the value of the symbol at the end
|
// This is the end of the section, so set the value of the symbol at the end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user