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 | 489d67927172941bf59b9f4829ab8910814fea24 (patch) | |
tree | a36101a0f30fac4ccf07c8fd29794a78adad47c3 /lib/MC/MCObjectStreamer.cpp | |
parent | 3c2e5f2140ade86ff353b27b37137d493f487558 (diff) |
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.cpp | 5 |
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(); } |