diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-03-24 20:53:02 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-03-24 20:53:02 +0000 |
commit | 3c9a3cc495c3eed7b60dc9cac6d816524a0cf47d (patch) | |
tree | 5bd89e27b2b2a10eff1e3f5e394282f1e7cf181c /llvm/lib/CodeGen | |
parent | 6378f7a5e2e20f693e34daf405afaeec578f9785 (diff) | |
download | bcm5719-llvm-3c9a3cc495c3eed7b60dc9cac6d816524a0cf47d.tar.gz bcm5719-llvm-3c9a3cc495c3eed7b60dc9cac6d816524a0cf47d.zip |
DebugInfo: Don't emit relocations to abbreviations in debug_info.dwo
llvm-svn: 204667
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index e396ff9a7f4..eb769fe7ae3 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2690,7 +2690,7 @@ DwarfTypeUnit *DwarfDebug::constructSkeletonTU(DwarfTypeUnit *TU) { // 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 diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 4a2b62421dd..86005cd3d80 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -2037,7 +2037,11 @@ void DwarfUnit::emitHeader(const MCSymbol *ASectionSym) const { // 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()); } |