llvm.org GIT mirror llvm / 0fca1c8
[gold-plugin] allow function/data sections to be toggleable Summary: r336838 allowed these to be toggleable. r336858 reverted r336838. r336943 made the generation of these sections conditional on LDPO_REL. This commit brings back the toggle-ability. You can specify: -plugin-opt=-function-sections -plugin-opt=-data-sections For your linker flags to disable the changes made in r336943. Without toggling r336943 off, arm64 linux kernels linked with gold-plugin see significant boot time regressions, but with r336943 outright reverted x86_64 linux kernels linked with gold-plugin fail to boot. Reviewers: pcc, void Reviewed By: pcc Subscribers: javed.absar, kristof.beyls, llvm-commits, srhines Differential Revision: https://reviews.llvm.org/D55291 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348389 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Desaulniers 1 year, 11 months ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
832832 Conf.Options.RelaxELFRelocations = false;
833833
834834 // Toggle function/data sections.
835 Conf.Options.FunctionSections = SplitSections;
836 Conf.Options.DataSections = SplitSections;
835 if (FunctionSections.getNumOccurrences() == 0)
836 Conf.Options.FunctionSections = SplitSections;
837 if (DataSections.getNumOccurrences() == 0)
838 Conf.Options.DataSections = SplitSections;
837839
838840 Conf.MAttrs = MAttrs;
839841 Conf.RelocModel = RelocationModel;