This is an archive of the discontinued LLVM Phabricator instance.

[gold-plugin] allow function/data sections to be toggleable
ClosedPublic

Authored by nickdesaulniers on Dec 4 2018, 12:53 PM.

Details

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.

Diff Detail

Event Timeline

pcc added a comment.Dec 4 2018, 1:05 PM

The commit message should explain why we are making these toggleable.

nickdesaulniers edited the summary of this revision. (Show Details)Dec 4 2018, 1:12 PM
nickdesaulniers edited the summary of this revision. (Show Details)Dec 4 2018, 1:12 PM
pcc accepted this revision.Dec 4 2018, 1:53 PM

LGTM with s/r336943/r336838/g and s/r336838/r336943/g in commit message.

This revision is now accepted and ready to land.Dec 4 2018, 1:53 PM
nickdesaulniers edited the summary of this revision. (Show Details)Dec 4 2018, 2:01 PM
This revision was automatically updated to reflect the committed changes.