summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-10-15 17:53:33 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-10-15 17:53:33 +0000
commita518b22d6b8a8b1eecf8b200852967b28cf0926c (patch)
tree2510feba56c2c42d3887ae97249e2e3dbcc3c549 /clang/lib/Basic
parent7c386f838aa63349cbea031a69ba528e265c1cc9 (diff)
downloadbcm5719-llvm-a518b22d6b8a8b1eecf8b200852967b28cf0926c.tar.gz
bcm5719-llvm-a518b22d6b8a8b1eecf8b200852967b28cf0926c.zip
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
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/Targets.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 889518bb2a9..d2ddf2dd11a 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud