diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-15 17:53:33 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-15 17:53:33 +0000 |
| commit | 86d18c56383404f2098c6dbc716852aad60ba060 (patch) | |
| tree | fe6ad9a976d76031578feb5fc9405c49220ef76f | |
| parent | bb13c320fff4bc4b3536e62626c97d7b055c6113 (diff) | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142076 91177308-0d34-0410-b5e6-96231b3b80d8
| -rw-r--r-- | lib/Basic/Targets.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 889518bb2a..d2ddf2dd11 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -328,6 +328,10 @@ public: this->UserLabelPrefix = ""; this->WIntType = TargetInfo::UnsignedInt; } + + virtual const char *getStaticInitSectionSpecifier() const { + return ".text.startup"; + } }; // NetBSD Target |
