1. Clean up code due to changes in SwitchTo*Section(2)
authorAnton Korobeynikov <asl@math.spbu.ru>
Tue, 31 Oct 2006 08:31:24 +0000 (08:31 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Tue, 31 Oct 2006 08:31:24 +0000 (08:31 +0000)
2. Added partial debug support for mingw\cygwin targets (the same as
   Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
   for storing debug info by default, thus many (runtime) libraries has
   this information included. These formats shouldn't be mixed in one binary
   ('stabs' & 'DWARF'), otherwise binutils tools will be confused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31311 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp
lib/CodeGen/DwarfWriter.cpp
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/X86/X86ATTAsmPrinter.cpp
lib/Target/X86/X86AsmPrinter.cpp
lib/Target/X86/X86AsmPrinter.h
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86IntelAsmPrinter.cpp
lib/Target/X86/X86TargetAsmInfo.cpp

index bfd0e37924b4ba3cd715301cd2e22065e0f6299d..05761d164769b7ac8ea9f2feddb64fd07382f4fa 100644 (file)
@@ -96,7 +96,7 @@ bool AsmPrinter::doInitialization(Module &M) {
       << "\n" << TAI->getCommentString()
       << " End of file scope inline assembly\n";
 
-  SwitchToDataSection("", 0);   // Reset back to no section.
+  SwitchToDataSection("");   // Reset back to no section.
   
   if (MachineDebugInfo *DebugInfo = getAnalysisToUpdate<MachineDebugInfo>()) {
     DebugInfo->AnalyzeModule(M);
@@ -160,7 +160,7 @@ void AsmPrinter::EmitConstantPool(unsigned Alignment, const char *Section,
                std::vector<std::pair<MachineConstantPoolEntry,unsigned> > &CP) {
   if (CP.empty()) return;
 
-  SwitchToDataSection(Section, 0);
+  SwitchToDataSection(Section);
   EmitAlignment(Alignment);
   for (unsigned i = 0, e = CP.size(); i != e; ++i) {
     O << TAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber() << '_'
@@ -203,7 +203,7 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI,
   if (TM.getRelocationModel() == Reloc::PIC_) {
     TargetLowering *LoweringInfo = TM.getTargetLowering();
     if (LoweringInfo && LoweringInfo->usesGlobalOffsetTable()) {
-      SwitchToDataSection(TAI->getJumpTableDataSection(), 0);
+      SwitchToDataSection(TAI->getJumpTableDataSection());
       if (TD->getPointerSize() == 8 && !JTEntryDirective)
         JTEntryDirective = TAI->getData64bitsDirective();
     } else {      
@@ -213,7 +213,7 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI,
       SwitchToTextSection(getSectionForFunction(*F).c_str(), F);
     }
   } else {
-    SwitchToDataSection(TAI->getJumpTableDataSection(), 0);
+    SwitchToDataSection(TAI->getJumpTableDataSection());
     if (TD->getPointerSize() == 8)
       JTEntryDirective = TAI->getData64bitsDirective();
   }
@@ -279,14 +279,14 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
   }
 
   if (GV->getName() == "llvm.global_ctors" && GV->use_empty()) {
-    SwitchToDataSection(TAI->getStaticCtorsSection(), 0);
+    SwitchToDataSection(TAI->getStaticCtorsSection());
     EmitAlignment(2, 0);
     EmitXXStructorList(GV->getInitializer());
     return true;
   } 
   
   if (GV->getName() == "llvm.global_dtors" && GV->use_empty()) {
-    SwitchToDataSection(TAI->getStaticDtorsSection(), 0);
+    SwitchToDataSection(TAI->getStaticDtorsSection());
     EmitAlignment(2, 0);
     EmitXXStructorList(GV->getInitializer());
     return true;
index 983d8f51821128a6dfb52a4952c9e5cc7a5772e7..7bec4d3cc4ef2f7e6ef5c50521636b9f53c38196 100644 (file)
@@ -2176,30 +2176,30 @@ void Dwarf::EmitInitial() {
   
   // Dwarf sections base addresses.
   if (TAI->getDwarfRequiresFrameSection()) {
-    Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0);
+    Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
     EmitLabel("section_frame", 0);
   }
-  Asm->SwitchToDataSection(TAI->getDwarfInfoSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfInfoSection());
   EmitLabel("section_info", 0);
-  Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection());
   EmitLabel("section_abbrev", 0);
-  Asm->SwitchToDataSection(TAI->getDwarfARangesSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfARangesSection());
   EmitLabel("section_aranges", 0);
-  Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
   EmitLabel("section_macinfo", 0);
-  Asm->SwitchToDataSection(TAI->getDwarfLineSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfLineSection());
   EmitLabel("section_line", 0);
-  Asm->SwitchToDataSection(TAI->getDwarfLocSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfLocSection());
   EmitLabel("section_loc", 0);
-  Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection());
   EmitLabel("section_pubnames", 0);
-  Asm->SwitchToDataSection(TAI->getDwarfStrSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfStrSection());
   EmitLabel("section_str", 0);
-  Asm->SwitchToDataSection(TAI->getDwarfRangesSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfRangesSection());
   EmitLabel("section_ranges", 0);
-  Asm->SwitchToTextSection(TAI->getTextSection(), 0);
+  Asm->SwitchToTextSection(TAI->getTextSection());
   EmitLabel("text_begin", 0);
-  Asm->SwitchToDataSection(TAI->getDataSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDataSection());
   EmitLabel("data_begin", 0);
 
   // Emit common frame information.
@@ -2408,7 +2408,7 @@ void Dwarf::EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID,
 ///
 void Dwarf::EmitDebugInfo() const {
   // Start debug info section.
-  Asm->SwitchToDataSection(TAI->getDwarfInfoSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfInfoSection());
   
   // Process each compile unit.
   for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) {
@@ -2444,7 +2444,7 @@ void Dwarf::EmitAbbreviations() const {
   // Check to see if it is worth the effort.
   if (!Abbreviations.empty()) {
     // Start the debug abbrev section.
-    Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection(), 0);
+    Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection());
     
     EmitLabel("abbrev_begin", 0);
     
@@ -2477,7 +2477,7 @@ void Dwarf::EmitDebugLines() const {
   const int MaxLineDelta = 255 + MinLineDelta;
 
   // Start the dwarf line section.
-  Asm->SwitchToDataSection(TAI->getDwarfLineSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfLineSection());
   
   // Construct the section header.
   
@@ -2636,7 +2636,7 @@ void Dwarf::EmitInitialDebugFrame() {
       TAI->getAddressSize() : -TAI->getAddressSize();
 
   // Start the dwarf frame section.
-  Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
 
   EmitLabel("frame_common", 0);
   EmitDifference("frame_common_end", 0,
@@ -2669,7 +2669,7 @@ void Dwarf::EmitFunctionDebugFrame() {
     return;
 
   // Start the dwarf frame section.
-  Asm->SwitchToDataSection(TAI->getDwarfFrameSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
   
   EmitDifference("frame_end", SubprogramCount,
                  "frame_begin", SubprogramCount);
@@ -2699,7 +2699,7 @@ void Dwarf::EmitFunctionDebugFrame() {
 ///
 void Dwarf::EmitDebugPubNames() {
   // Start the dwarf pubnames section.
-  Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection());
     
   // Process each compile unit.
   for (unsigned i = 0, N = CompileUnits.size(); i < N; ++i) {
@@ -2746,7 +2746,7 @@ void Dwarf::EmitDebugStr() {
   // Check to see if it is worth the effort.
   if (!StringPool.empty()) {
     // Start the dwarf str section.
-    Asm->SwitchToDataSection(TAI->getDwarfStrSection(), 0);
+    Asm->SwitchToDataSection(TAI->getDwarfStrSection());
     
     // For each of strings in the string pool.
     for (unsigned StringID = 1, N = StringPool.size();
@@ -2766,7 +2766,7 @@ void Dwarf::EmitDebugStr() {
 ///
 void Dwarf::EmitDebugLoc() {
   // Start the dwarf loc section.
-  Asm->SwitchToDataSection(TAI->getDwarfLocSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfLocSection());
   
   O << "\n";
 }
@@ -2775,7 +2775,7 @@ void Dwarf::EmitDebugLoc() {
 ///
 void Dwarf::EmitDebugARanges() {
   // Start the dwarf aranges section.
-  Asm->SwitchToDataSection(TAI->getDwarfARangesSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfARangesSection());
   
   // FIXME - Mock up
 #if 0
@@ -2816,7 +2816,7 @@ void Dwarf::EmitDebugARanges() {
 ///
 void Dwarf::EmitDebugRanges() {
   // Start the dwarf ranges section.
-  Asm->SwitchToDataSection(TAI->getDwarfRangesSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfRangesSection());
   
   O << "\n";
 }
@@ -2825,7 +2825,7 @@ void Dwarf::EmitDebugRanges() {
 ///
 void Dwarf::EmitDebugMacInfo() {
   // Start the dwarf macinfo section.
-  Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDwarfMacInfoSection());
   
   O << "\n";
 }
@@ -2939,14 +2939,14 @@ void Dwarf::EndModule() {
   EOL("Dwarf End Module");
   
   // Standard sections final addresses.
-  Asm->SwitchToTextSection(TAI->getTextSection(), 0);
+  Asm->SwitchToTextSection(TAI->getTextSection());
   EmitLabel("text_end", 0);
-  Asm->SwitchToDataSection(TAI->getDataSection(), 0);
+  Asm->SwitchToDataSection(TAI->getDataSection());
   EmitLabel("data_end", 0);
   
   // End text sections.
   for (unsigned i = 1, N = SectionMap.size(); i <= N; ++i) {
-    Asm->SwitchToTextSection(SectionMap[i].c_str(), 0);
+    Asm->SwitchToTextSection(SectionMap[i].c_str());
     EmitLabel("section_end", i);
   }
   
index 21c2f740af822d8a0c19ed438dd9825a8687f3af..aafc7825f4489a4171e20d57458b301371de3379 100644 (file)
@@ -577,7 +577,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
     for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end();
          i != e; ++i) {
       SwitchToTextSection(".section __TEXT,__picsymbolstub1,symbol_stubs,"
-                          "pure_instructions,32", 0);
+                          "pure_instructions,32");
       EmitAlignment(4);
       O << "L" << *i << "$stub:\n";
       O << "\t.indirect_symbol " << *i << "\n";
@@ -593,7 +593,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
         O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr-L0$" << *i << ")(r11)\n";
       O << "\tmtctr r12\n";
       O << "\tbctr\n";
-      SwitchToDataSection(".lazy_symbol_pointer", 0);
+      SwitchToDataSection(".lazy_symbol_pointer");
       O << "L" << *i << "$lazy_ptr:\n";
       O << "\t.indirect_symbol " << *i << "\n";
       if (isPPC64)
@@ -605,7 +605,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
     for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end();
          i != e; ++i) {
       SwitchToTextSection(".section __TEXT,__symbol_stub1,symbol_stubs,"
-                          "pure_instructions,16", 0);
+                          "pure_instructions,16");
       EmitAlignment(4);
       O << "L" << *i << "$stub:\n";
       O << "\t.indirect_symbol " << *i << "\n";
@@ -616,7 +616,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
         O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr)(r11)\n";
       O << "\tmtctr r12\n";
       O << "\tbctr\n";
-      SwitchToDataSection(".lazy_symbol_pointer", 0);
+      SwitchToDataSection(".lazy_symbol_pointer");
       O << "L" << *i << "$lazy_ptr:\n";
       O << "\t.indirect_symbol " << *i << "\n";
       if (isPPC64)
@@ -630,7 +630,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
 
   // Output stubs for external and common global variables.
   if (GVStubs.begin() != GVStubs.end()) {
-    SwitchToDataSection(".non_lazy_symbol_pointer", 0);
+    SwitchToDataSection(".non_lazy_symbol_pointer");
     for (std::set<std::string>::iterator I = GVStubs.begin(),
          E = GVStubs.end(); I != E; ++I) {
       O << "L" << *I << "$non_lazy_ptr:\n";
index 42af5b69ac1483c4a6c4c3a72d8336c03a9de1f8..d6199dc0e98feec63d5ef256bbd1a1b2706404c4 100755 (executable)
@@ -52,7 +52,9 @@ std::string X86ATTAsmPrinter::getSectionForFunction(const Function &F) const {
 /// method to print assembly for each instruction.
 ///
 bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
-  if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) {
+  if (Subtarget->isTargetDarwin() ||
+      Subtarget->isTargetELF() ||
+      Subtarget->isTargetCygwin()) {
     // Let PassManager know we need debug information and relay
     // the MachineDebugInfo address on to DwarfWriter.
     DW.SetDebugInfo(&getAnalysis<MachineDebugInfo>());
@@ -111,7 +113,9 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
        F->getLinkage() == Function::WeakLinkage))
     O << "_llvm$workaround$fake$stub_" << CurrentFnName << ":\n";
 
-  if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) {
+  if (Subtarget->isTargetDarwin() ||
+      Subtarget->isTargetELF() ||
+      Subtarget->isTargetCygwin()) {
     // Emit pre-function debug information.
     DW.BeginFunction(&MF);
   }
@@ -141,7 +145,9 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   if (TAI->hasDotTypeDotSizeDirective())
     O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
 
-  if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) {
+  if (Subtarget->isTargetDarwin() ||
+      Subtarget->isTargetELF() ||
+      Subtarget->isTargetCygwin()) {
     // Emit post-function debug information.
     DW.EndFunction();
   }
index 9ef0ad1027e742795c685b6bd25a3b53b5b0833a..41ce91a1a33d9fba13b9e00f898a365e567a40b9 100644 (file)
@@ -116,7 +116,7 @@ bool X86SharedAsmPrinter::doInitialization(Module &M) {
 
     // Emit initial debug information.
     DW.BeginModule(&M);
-  } else if (Subtarget->isTargetELF()) {
+  } else if (Subtarget->isTargetELF() || Subtarget->isTargetCygwin()) {
     // Emit initial debug information.
     DW.BeginModule(&M);
   }
@@ -253,7 +253,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
   
   // Output linker support code for dllexported globals
   if (DLLExportedGVs.begin() != DLLExportedGVs.end()) {
-    SwitchToDataSection(".section .drectve", 0);    
+    SwitchToDataSection(".section .drectve");
   }
 
   for (std::set<std::string>::iterator i = DLLExportedGVs.begin(),
@@ -263,7 +263,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
   }    
 
   if (DLLExportedFns.begin() != DLLExportedFns.end()) {
-    SwitchToDataSection(".section .drectve", 0);    
+    SwitchToDataSection(".section .drectve");
   }
 
   for (std::set<std::string>::iterator i = DLLExportedFns.begin(),
@@ -273,7 +273,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
   }    
  
   if (Subtarget->isTargetDarwin()) {
-    SwitchToDataSection("", 0);
+    SwitchToDataSection("");
 
     // Output stubs for dynamically-linked functions
     unsigned j = 1;
@@ -291,7 +291,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
     // Output stubs for external and common global variables.
     if (GVStubs.begin() != GVStubs.end())
       SwitchToDataSection(
-                    ".section __IMPORT,__pointers,non_lazy_symbol_pointers", 0);
+                    ".section __IMPORT,__pointers,non_lazy_symbol_pointers");
     for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end();
          i != e; ++i) {
       O << "L" << *i << "$non_lazy_ptr:\n";
@@ -308,7 +308,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
     // linker can safely perform dead code stripping.  Since LLVM never
     // generates code that does this, it is always safe to set.
     O << "\t.subsections_via_symbols\n";
-  } else if (Subtarget->isTargetELF()) {
+  } else if (Subtarget->isTargetELF() || Subtarget->isTargetCygwin()) {
     // Emit final debug information.
     DW.EndModule();
   }
index b2fbe0529cbba424a6627d4dfe6ee5468d20cc41..3503e37c0bc709e82a4f893d4c09200e37ee1c74 100755 (executable)
@@ -67,7 +67,9 @@ struct VISIBILITY_HIDDEN X86SharedAsmPrinter : public AsmPrinter {
 
   void getAnalysisUsage(AnalysisUsage &AU) const {
     AU.setPreservesAll();
-    if (Subtarget->isTargetDarwin() || Subtarget->isTargetELF()) {
+    if (Subtarget->isTargetDarwin() ||
+        Subtarget->isTargetELF() ||
+        Subtarget->isTargetCygwin()) {
       AU.addRequired<MachineDebugInfo>();
     }
     MachineFunctionPass::getAnalysisUsage(AU);
index 6de5032ff302b429a482b90d859296328e0e93d2..96ab93949d2ed53b4423ae4dcebd0a3b878298bb 100644 (file)
@@ -219,7 +219,9 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
   setOperationAction(ISD::LOCATION, MVT::Other, Expand);
   setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
   // FIXME - use subtarget debug flags
-  if (!Subtarget->isTargetDarwin() && !Subtarget->isTargetELF())
+  if (!Subtarget->isTargetDarwin() &&
+      !Subtarget->isTargetELF() &&
+      !Subtarget->isTargetCygwin())
     setOperationAction(ISD::DEBUG_LABEL, MVT::Other, Expand);
 
   // VASTART needs to be custom lowered to use the VarArgsFrameIndex
index 11caea9dbeffb8b6f895158a79d1f7179af8d229..7b2396345c86fb5c4516a6d24b6b2137dfbd2607 100755 (executable)
@@ -393,14 +393,14 @@ bool X86IntelAsmPrinter::doFinalization(Module &M) {
     switch (I->getLinkage()) {
     case GlobalValue::LinkOnceLinkage:
     case GlobalValue::WeakLinkage:
-      SwitchToDataSection("", 0);
+      SwitchToDataSection("");
       O << name << "?\tsegment common 'COMMON'\n";
       bCustomSegment = true;
       // FIXME: the default alignment is 16 bytes, but 1, 2, 4, and 256
       // are also available.
       break;
     case GlobalValue::AppendingLinkage:
-      SwitchToDataSection("", 0);
+      SwitchToDataSection("");
       O << name << "?\tsegment public 'DATA'\n";
       bCustomSegment = true;
       // FIXME: the default alignment is 16 bytes, but 1, 2, 4, and 256
@@ -434,7 +434,7 @@ bool X86IntelAsmPrinter::doFinalization(Module &M) {
     // Output linker support code for dllexported globals
   if ((DLLExportedGVs.begin() != DLLExportedGVs.end()) ||
       (DLLExportedFns.begin() != DLLExportedFns.end())) {
-    SwitchToDataSection("", 0);
+    SwitchToDataSection("");
     O << "; WARNING: The following code is valid only with MASM v8.x and (possible) higher\n"
       << "; This version of MASM is usually shipped with Microsoft Visual Studio 2005\n"
       << "; or (possible) further versions. Unfortunately, there is no way to support\n"
@@ -461,7 +461,7 @@ bool X86IntelAsmPrinter::doFinalization(Module &M) {
   
   // Bypass X86SharedAsmPrinter::doFinalization().
   AsmPrinter::doFinalization(M);
-  SwitchToDataSection("", 0);
+  SwitchToDataSection("");
   O << "\tend\n";
   return false; // success
 }
index 93596c04b46729d7cde960ca4d90ebf3af38a935..229473c89c1c961e85bf1cf6b87a7d39993fcb34 100644 (file)
@@ -90,6 +90,24 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
     HasDotTypeDotSizeDirective = false;
     StaticCtorsSection = "\t.section .ctors,\"aw\"";
     StaticDtorsSection = "\t.section .dtors,\"aw\"";
+
+    // Set up DWARF directives
+    HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
+    PrivateGlobalPrefix = "L";  // Prefix for private global symbols
+    DwarfRequiresFrameSection = false;
+    DwarfAbbrevSection =  "\t.section\t.debug_abbrev,\"dr\"";
+    DwarfInfoSection =    "\t.section\t.debug_info,\"dr\"";
+    DwarfLineSection =    "\t.section\t.debug_line,\"dr\"";
+    DwarfFrameSection =   "\t.section\t.debug_frame,\"dr\"";
+    DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"dr\"";
+    DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"dr\"";
+    DwarfStrSection =     "\t.section\t.debug_str,\"dr\"";
+    DwarfLocSection =     "\t.section\t.debug_loc,\"dr\"";
+    DwarfARangesSection = "\t.section\t.debug_aranges,\"dr\"";
+    DwarfRangesSection =  "\t.section\t.debug_ranges,\"dr\"";
+    DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"dr\"";
+    break;
+    
     break;
   case X86Subtarget::isWindows:
     GlobalPrefix = "_";