mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Rename and improve emitSectionOffset.
Different object formats represent references from dwarf in different ways. ELF uses a relocation to the referenced point (except for .dwo) and COFF/MachO use the offset of the referenced point inside its section. This patch renames emitSectionOffset because * It doesn't produce an offset on ELF. * It changes behavior depending on how DWARF is represented, so adding dwarf to its name is probably a good thing. The patch also adds an option to force the use of offsets.That avoids funny looking code like if (!UseOffsets) Asm->emitSectionOffset.... It was correct, but read as if the ! was inverted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239866 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1414,7 +1414,7 @@ void DwarfDebug::emitDebugPubSection(
|
||||
Asm->EmitInt16(dwarf::DW_PUBNAMES_VERSION);
|
||||
|
||||
Asm->OutStreamer->AddComment("Offset of Compilation Unit Info");
|
||||
Asm->emitSectionOffset(TheU->getLabelBegin());
|
||||
Asm->emitDwarfSymbolReference(TheU->getLabelBegin());
|
||||
|
||||
Asm->OutStreamer->AddComment("Compilation Unit Length");
|
||||
Asm->EmitInt32(TheU->getLength());
|
||||
@@ -1739,7 +1739,7 @@ void DwarfDebug::emitDebugARanges() {
|
||||
Asm->OutStreamer->AddComment("DWARF Arange version number");
|
||||
Asm->EmitInt16(dwarf::DW_ARANGES_VERSION);
|
||||
Asm->OutStreamer->AddComment("Offset Into Debug Info Section");
|
||||
Asm->emitSectionOffset(CU->getLabelBegin());
|
||||
Asm->emitDwarfSymbolReference(CU->getLabelBegin());
|
||||
Asm->OutStreamer->AddComment("Address Size (in bytes)");
|
||||
Asm->EmitInt8(PtrSize);
|
||||
Asm->OutStreamer->AddComment("Segment Size (in bytes)");
|
||||
|
Reference in New Issue
Block a user