diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-02-28 21:13:05 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-02-28 21:13:05 +0000 |
| commit | c22c85c29ceae07306018e5ac25f21dc7732074a (patch) | |
| tree | 54f2875be56207040975848d33f73b4c84e833fc /llvm/lib/MC/MCAsmStreamer.cpp | |
| parent | 2ad368fce35afcf0933afb2cf4074d0c810aac4a (diff) | |
| download | bcm5719-llvm-c22c85c29ceae07306018e5ac25f21dc7732074a.tar.gz bcm5719-llvm-c22c85c29ceae07306018e5ac25f21dc7732074a.zip | |
On ELF, create relocations to the abbreviation and line sections when producing
debug info for assembly files. We were already doing the right thing when
producing debug info for C/C++.
ELF linkers don't know dwarf, so they depend on these relocations to produce
valid dwarf output.
llvm-svn: 151655
Diffstat (limited to 'llvm/lib/MC/MCAsmStreamer.cpp')
| -rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index f7c6765ff32..742d15d9e7e 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -1309,13 +1309,15 @@ void MCAsmStreamer::EmitRawText(StringRef String) { } void MCAsmStreamer::FinishImpl() { + // FIXME: This header is duplicated with MCObjectStreamer // Dump out the dwarf file & directory tables and line tables. + const MCSymbol *LineSectionSymbol; if (getContext().hasDwarfFiles() && !UseLoc) - MCDwarfFileTable::Emit(this); + LineSectionSymbol = MCDwarfFileTable::Emit(this); // If we are generating dwarf for assembly source files dump out the sections. if (getContext().getGenDwarfForAssembly()) - MCGenDwarfInfo::Emit(this); + MCGenDwarfInfo::Emit(this, LineSectionSymbol); if (!UseCFI) EmitFrames(false); |

