summaryrefslogtreecommitdiff
path: root/lib/MC/MCObjectStreamer.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/MCObjectStreamer.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/MCObjectStreamer.cpp')
-rw-r--r--lib/MC/MCObjectStreamer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp
index f2911fa07b..a7eb8b03a2 100644
--- a/lib/MC/MCObjectStreamer.cpp
+++ b/lib/MC/MCObjectStreamer.cpp
@@ -266,12 +266,13 @@ void MCObjectStreamer::EmitGPRel32Value(const MCExpr *Value) {
void MCObjectStreamer::FinishImpl() {
// Dump out the dwarf file & directory tables and line tables.
+ const MCSymbol *LineSectionSymbol;
if (getContext().hasDwarfFiles())
- 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);
getAssembler().Finish();
}