summaryrefslogtreecommitdiff
path: root/lib/MC/MCAsmStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-02-28 21:13:05 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-02-28 21:13:05 +0000
commit489d67927172941bf59b9f4829ab8910814fea24 (patch)
treea36101a0f30fac4ccf07c8fd29794a78adad47c3 /lib/MC/MCAsmStreamer.cpp
parent3c2e5f2140ade86ff353b27b37137d493f487558 (diff)
downloadllvm-489d67927172941bf59b9f4829ab8910814fea24.tar.gz
llvm-489d67927172941bf59b9f4829ab8910814fea24.tar.bz2
llvm-489d67927172941bf59b9f4829ab8910814fea24.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151655 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAsmStreamer.cpp')
-rw-r--r--lib/MC/MCAsmStreamer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp
index f7c6765ff3..742d15d9e7 100644
--- a/lib/MC/MCAsmStreamer.cpp
+++ b/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);