[llvm] r200285 - MC: Add a .debug section that we'll soon use to emit debug info into COFF files

Timur Iskhodzhanov timurrrr at google.com
Mon Jan 27 19:48:44 PST 2014


Author: timurrrr
Date: Mon Jan 27 21:48:44 2014
New Revision: 200285

URL: http://llvm.org/viewvc/llvm-project?rev=200285&view=rev
Log:
MC: Add a .debug section that we'll soon use to emit debug info into COFF files

Modified:
    llvm/trunk/include/llvm/MC/MCObjectFileInfo.h
    llvm/trunk/lib/MC/MCObjectFileInfo.cpp

Modified: llvm/trunk/include/llvm/MC/MCObjectFileInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCObjectFileInfo.h?rev=200285&r1=200284&r2=200285&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCObjectFileInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCObjectFileInfo.h Mon Jan 27 21:48:44 2014
@@ -129,6 +129,8 @@ protected:
   const MCSection *DwarfGnuPubNamesSection;
   const MCSection *DwarfGnuPubTypesSection;
 
+  const MCSection *COFFDebugSymbolsSection;
+
   // Extra TLS Variable Data section.  If the target needs to put additional
   // information for a TLS variable, it'll go here.
   const MCSection *TLSExtraDataSection;
@@ -283,6 +285,10 @@ public:
     return DwarfAddrSection;
   }
 
+  const MCSection *getCOFFDebugSymbolsSection() const {
+    return COFFDebugSymbolsSection;
+  }
+
   const MCSection *getTLSExtraDataSection() const {
     return TLSExtraDataSection;
   }

Modified: llvm/trunk/lib/MC/MCObjectFileInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=200285&r1=200284&r2=200285&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectFileInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectFileInfo.cpp Mon Jan 27 21:48:44 2014
@@ -609,6 +609,13 @@ void MCObjectFileInfo::InitCOFFMCObjectF
                         SectionKind::getReadOnly());
 
   // Debug info.
+  COFFDebugSymbolsSection =
+    Ctx->getCOFFSection(".debug$S",
+                        COFF::IMAGE_SCN_MEM_DISCARDABLE |
+                        COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
+                        COFF::IMAGE_SCN_MEM_READ,
+                        SectionKind::getMetadata());
+
   DwarfAbbrevSection =
     Ctx->getCOFFSection(".debug_abbrev",
                         COFF::IMAGE_SCN_MEM_DISCARDABLE |





More information about the llvm-commits mailing list