[llvm-commits] [llvm] r120760 - in /llvm/trunk: include/llvm/MC/MCContext.h include/llvm/MC/MCDwarf.h lib/MC/MCAsmStreamer.cpp lib/MC/MCDwarf.cpp

Rafael Espíndola rafael.espindola at gmail.com
Thu Dec 2 16:40:25 PST 2010


> This should only be done if the target is know to have a broken linker.
>> +  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);
>> +
>> +    // emit the sequence to set the address
>> +    EmitDwarfSetAddress(MCOS, SectionEnd, PointerSize);
>> +    // emit the sequence for the LineDelta (from 1) and a zero address delta.
>> +    MCDwarfLineAddr::Emit(MCOS, INT64_MAX, 0);
>> +  }
>> +

And even with a broken linker using the text section looks strange.
Does MachO support only one text section? If not, what happens when
using -ffunction-sections?

Cheers,
Rafael




More information about the llvm-commits mailing list