diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-09-05 04:15:00 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-09-05 04:15:00 +0000 |
commit | 5c70de1072b1ac25a3e318c9a2cd68f34d10959b (patch) | |
tree | 2b3a8ef95a2933e6bf9cff88708bac66cfa31e5e /llvm/lib/MC/MCDwarf.cpp | |
parent | 1a486da543b7e4ea7a635f8f467542fd9398772c (diff) | |
download | bcm5719-llvm-5c70de1072b1ac25a3e318c9a2cd68f34d10959b.tar.gz bcm5719-llvm-5c70de1072b1ac25a3e318c9a2cd68f34d10959b.zip |
MC: correct DWARF header for PE/COFF assembly input
The header contains an offset to the DWARF line table for the CU. The offset
must be section relative for COFF and absolute for others. The non-assembly
code path for the DWARF header generation already has the correct emission for
the headers. This corrects the assembly input path.
This was identified by BFD objecting to the LLVM generated DWARF information.
llvm-svn: 217222
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index a592c094655..5bc0e43f59d 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -693,11 +693,11 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS, // DW_AT_stmt_list, a 4 byte offset from the start of the .debug_line section, // which is at the start of that section so this is zero. - if (LineSectionSymbol) { - MCOS->EmitSymbolValue(LineSectionSymbol, 4); - } else { + if (LineSectionSymbol) + MCOS->EmitSymbolValue(LineSectionSymbol, 4, + AsmInfo.needsDwarfSectionOffsetDirective()); + else MCOS->EmitIntValue(0, 4); - } if (RangesSectionSymbol) { // There are multiple sections containing code, so we must use the |