Add the __TEXT,__StaticInit section to the list of sections emitted at the
authorBob Wilson <bob.wilson@apple.com>
Fri, 30 Jul 2010 19:55:47 +0000 (19:55 +0000)
committerBob Wilson <bob.wilson@apple.com>
Fri, 30 Jul 2010 19:55:47 +0000 (19:55 +0000)
beginning on ARM Darwin assembly files so that it won't be placed after
debug sections.  Radar 8252813.

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

lib/Target/ARM/ARMAsmPrinter.cpp

index 003bdaca7443d8b2d7aef8339fdd1a7f087ae06b..19cb932d1cc0cce0087090df9bc0aa25bee45d9c 100644 (file)
@@ -1165,6 +1165,12 @@ void ARMAsmPrinter::EmitStartOfAsmFile(Module &M) {
                                      16, SectionKind::getText());
         OutStreamer.SwitchSection(sect);
       }
+      const MCSection *StaticInitSect =
+        OutContext.getMachOSection("__TEXT", "__StaticInit",
+                                   MCSectionMachO::S_REGULAR |
+                                   MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
+                                   SectionKind::getText());
+      OutStreamer.SwitchSection(StaticInitSect);
     }
   }