This is an archive of the discontinued LLVM Phabricator instance.

Make __start_sec __end_sec handling more precise
ClosedPublic

Authored by rafael on Jul 26 2017, 1:14 PM.

Details

Reviewers
ruiu
tejohnson
pcc
Summary

With this we only ask LTO to keep a C named section if there is a start_ or end symbol.

This is not as strict as lld's --gc-sections, but is as good as we can get without having a far more detailed ir summary.

Diff Detail

Event Timeline

rafael created this revision.Jul 26 2017, 1:14 PM
pcc added a subscriber: pcc.Jul 26 2017, 1:20 PM
pcc added inline comments.
ELF/LTO.cpp
134

Probably better to move this loop to the BitcodeCompiler ctor to avoid quadratic complexity.

136

Should this be __stop_ instead of __end_?

Address review comments

pcc accepted this revision.Jul 26 2017, 4:19 PM

LGTM

ELF/LTO.h
43

Nit: I'd move this to where the other fields are.

This revision is now accepted and ready to land.Jul 26 2017, 4:19 PM
espindola closed this revision.Mar 14 2018, 3:48 PM
espindola added a subscriber: espindola.

309232