Fix DWARF debugging information on x86/Linux and (hopefully)
Mingw32/Cygwin targets. This fixes PR978
llvm-svn: 35000
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
index 23cab9d..c66862a 100644
--- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -97,6 +97,7 @@
case X86Subtarget::isELF:
// Set up DWARF directives
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
+ AbsoluteSectionOffsets = true;
// bool HasLEB128; // Defaults to false.
// hasDotLoc - True if target asm supports .loc directives.
// bool HasDotLoc; // Defaults to false.
@@ -130,9 +131,11 @@
// Set up DWARF directives
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
+ AbsoluteSectionOffsets = true;
PrivateGlobalPrefix = "L"; // Prefix for private global symbols
WeakRefDirective = "\t.weak\t";
DwarfRequiresFrameSection = false;
+ DwarfSectionOffsetDirective = "\t.secrel32\t";
DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"dr\"";
DwarfInfoSection = "\t.section\t.debug_info,\"dr\"";
DwarfLineSection = "\t.section\t.debug_line,\"dr\"";