Place static initializers on linux into the ".text.startup" section, so the linker can group them together for performance.

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.

llvm-svn: 142076
This commit is contained in:
Benjamin Kramer 2011-10-15 17:53:33 +00:00
parent 7c386f838a
commit a518b22d6b
1 changed files with 4 additions and 0 deletions

View File

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