summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gold/gold-plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index cf9f37a5b1e..ac99a08d81d 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -750,6 +750,9 @@ static std::unique_ptr<LTO> createLTO() {
// FIXME: Check the gold version or add a new option to enable them.
Conf.Options.RelaxELFRelocations = false;
+ // Enable function sections by default.
+ Conf.Options.FunctionSections = true;
+
Conf.MAttrs = MAttrs;
Conf.RelocModel = RelocationModel;
Conf.CGOptLevel = getCGOptLevel();
OpenPOWER on IntegriCloud