Add .pdata and .xdata sections to the COFF TLOF implementation.
[oota-llvm.git] / lib / CodeGen / TargetLoweringObjectFileImpl.cpp
index c1e1b76c56381db2594be46ef89122b6e56af45d..964919e7b3c6763241de9d6dbe5eeb7a40ed1f31 100644 (file)
@@ -941,6 +941,7 @@ void TargetLoweringObjectFileCOFF::Initialize(MCContext &Ctx,
                                 SectionKind::getMetadata());
   DwarfLineSection =
     getContext().getCOFFSection(".debug_line",
+                                SectionKind::getMetadata());
                                 COFF::IMAGE_SCN_MEM_DISCARDABLE |
                                 COFF::IMAGE_SCN_MEM_READ,
                                 SectionKind::getMetadata());
@@ -989,6 +990,20 @@ void TargetLoweringObjectFileCOFF::Initialize(MCContext &Ctx,
     getContext().getCOFFSection(".drectve",
                                 COFF::IMAGE_SCN_LNK_INFO,
                                 SectionKind::getMetadata());
+
+  PDataSection =
+    getContext().getCOFFSection(".pdata",
+                                COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
+                                COFF::IMAGE_SCN_MEM_READ |
+                                COFF::IMAGE_SCN_MEM_WRITE,
+                                SectionKind::getDataRel());
+
+  XDataSection =
+    getContext().getCOFFSection(".xdata",
+                                COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
+                                COFF::IMAGE_SCN_MEM_READ |
+                                COFF::IMAGE_SCN_MEM_WRITE,
+                                SectionKind::getDataRel());
 }
 
 const MCSection *TargetLoweringObjectFileCOFF::getEHFrameSection() const {