[llvm] r204667 - DebugInfo: Don't emit relocations to abbreviations in debug_info.dwo
David Blaikie
dblaikie at gmail.com
Mon Mar 24 13:53:02 PDT 2014
Author: dblaikie
Date: Mon Mar 24 15:53:02 2014
New Revision: 204667
URL: http://llvm.org/viewvc/llvm-project?rev=204667&view=rev
Log:
DebugInfo: Don't emit relocations to abbreviations in debug_info.dwo
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/trunk/test/DebugInfo/X86/fission-cu.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=204667&r1=204666&r2=204667&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Mar 24 15:53:02 2014
@@ -2690,7 +2690,7 @@ DwarfTypeUnit *DwarfDebug::constructSkel
// compile units that would normally be in debug_info.
void DwarfDebug::emitDebugInfoDWO() {
assert(useSplitDwarf() && "No split dwarf debug info?");
- InfoHolder.emitUnits(this, DwarfAbbrevDWOSectionSym);
+ InfoHolder.emitUnits(this, nullptr);
}
// Emit the .debug_abbrev.dwo section for separated dwarf. This contains the
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=204667&r1=204666&r2=204667&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Mon Mar 24 15:53:02 2014
@@ -2037,7 +2037,11 @@ void DwarfUnit::emitHeader(const MCSymbo
// We share one abbreviations table across all units so it's always at the
// start of the section. Use a relocatable offset where needed to ensure
// linking doesn't invalidate that offset.
- Asm->EmitSectionOffset(ASectionSym, ASectionSym);
+ if (ASectionSym)
+ Asm->EmitSectionOffset(ASectionSym, ASectionSym);
+ else
+ // Use a constant value in the dwo file, to avoid relocations
+ Asm->EmitInt32(0);
Asm->OutStreamer.AddComment("Address Size (in bytes)");
Asm->EmitInt8(Asm->getDataLayout().getPointerSize());
}
Modified: llvm/trunk/test/DebugInfo/X86/fission-cu.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-cu.ll?rev=204667&r1=204666&r2=204667&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-cu.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-cu.ll Mon Mar 24 15:53:02 2014
@@ -110,5 +110,6 @@
; OBJ-NEXT: }
; HDR-NOT: .debug_aranges
+; HDR-NOT: .rela.{{.*}}.dwo
!9 = metadata !{i32 1, metadata !"Debug Info Version", i32 1}
More information about the llvm-commits
mailing list