]> granicus.if.org Git - clang/commitdiff
Place static initializers on linux into the ".text.startup" section, so the linker...
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 15 Oct 2011 17:53:33 +0000 (17:53 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 15 Oct 2011 17:53:33 +0000 (17:53 +0000)
This only has an effect with fairly new binutils (2.21.51 or later). Other ELF targets probably want this as well, but on BSDs binutils is usually old so it doesn't matter.

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

lib/Basic/Targets.cpp

index 889518bb2a993b63141d40ccd3de0c07485fe8f6..d2ddf2dd11ae107520ccf0b76069493fd5b9de2f 100644 (file)
@@ -328,6 +328,10 @@ public:
     this->UserLabelPrefix = "";
     this->WIntType = TargetInfo::UnsignedInt;
   }
+
+  virtual const char *getStaticInitSectionSpecifier() const {
+    return ".text.startup";
+  }
 };
 
 // NetBSD Target