[PATCH] Use object file specific section type for initial text section

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Sun Apr 14 13:47:31 PDT 2013


  LGTM with the comment updated.

  Thanks!


================
Comment at: lib/MC/MCAsmStreamer.cpp:134
@@ -133,7 +133,3 @@
   virtual void InitToTextSection() {
-    // FIXME, this is MachO specific, but the testsuite
-    // expects this.
-    SwitchSection(getContext().getMachOSection(
-                                      "__TEXT", "__text",
-                                      MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
-                                      0, SectionKind::getText()));
+    // MC tests without explicit section directives rely on this.
+    SwitchSection(getContext().getObjectFileInfo()->getTextSection());
----------------
Not just tests, right? GAS accepts a file with just

add %eax, 1



http://llvm-reviews.chandlerc.com/D668

BRANCH
  asmstreamer-dummy-sect

ARCANIST PROJECT
  llvm



More information about the llvm-commits mailing list