diff options
author | Renato Golin <renato.golin@arm.com> | 2011-03-16 21:05:52 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@arm.com> | 2011-03-16 21:05:52 +0000 |
commit | a3aeafeb352f6f1b5fbed37d9ffa8d2971bb2e7f (patch) | |
tree | 6fa9485ba7ed1f7cebe1e19f3e61101169ff75b7 /llvm/lib/CodeGen | |
parent | 9875a3ce70c5c6c68e4ceb055239fe57680ca01f (diff) | |
download | bcm5719-llvm-a3aeafeb352f6f1b5fbed37d9ffa8d2971bb2e7f.tar.gz bcm5719-llvm-a3aeafeb352f6f1b5fbed37d9ffa8d2971bb2e7f.zip |
Patch to a fix dwarf relocation problem on ARM. One-line fix plus the test where it used to break.
llvm-svn: 127757
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 15330c28d2c..cb542aef707 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -3272,7 +3272,9 @@ void DwarfDebug::emitDIE(DIE *Die) { case dwarf::DW_AT_location: { if (UseDotDebugLocEntry.count(Die) != 0) { DIELabel *L = cast<DIELabel>(Values[i]); - Asm->EmitLabelDifference(L->getValue(), DwarfDebugLocSectionSym, 4); + // Emitting reference to label directly, so the assembler can + // emit the relocations and the offset automatically. + Asm->EmitReference(L->getValue(), dwarf::DW_EH_PE_udata4); } else Values[i]->EmitValue(Asm, Form); break; @@ -3623,6 +3625,7 @@ void DwarfDebug::emitDebugLoc() { if (DotDebugLocEntries.empty()) return; + // Group debug entries. for (SmallVector<DotDebugLocEntry, 4>::iterator I = DotDebugLocEntries.begin(), E = DotDebugLocEntries.end(); I != E; ++I) { @@ -3631,7 +3634,7 @@ void DwarfDebug::emitDebugLoc() { Entry.Merge(I+1); } - // Start the dwarf loc section. + // Start the dwarf location section. Asm->OutStreamer.SwitchSection( Asm->getObjFileLowering().getDwarfLocSection()); unsigned char Size = Asm->getTargetData().getPointerSize(); |