This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF] Fix stale comment about doing ICF
ClosedPublic

Authored by russell.gallop on Oct 3 2019, 7:50 AM.

Diff Detail

Event Timeline

russell.gallop created this revision.Oct 3 2019, 7:50 AM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay added inline comments.Oct 3 2019, 11:43 PM
lld/ELF/Driver.cpp
1917

merging of SHF_MERGE is not correct, either. The step is performed at sec->finalizeInputSections(); after D67504.

russell.gallop marked an inline comment as done.

Further fix comments.

MaskRay added inline comments.
lld/ELF/Driver.cpp
1919

@peter.smith in case he has suggestions for the wording.

peter.smith added inline comments.Oct 10 2019, 5:49 AM
lld/ELF/Driver.cpp
1919

I've got a minor suggestion, no strong opinions though.

I think it might be worth commenting separately about splitSections as it isn't obvious why it is where it is. Something like:

// Split SHF_MERGE and .eh_frame sections into pieces in preparation for garbage collection.
splitSections<ELFT>();
// Garbage collection and removal of unused shared objects from dependencies.
markLive<ELFT>();
demoteSharedSymbols();
russell.gallop marked 2 inline comments as done.

Thanks. I've used that wording. It describes the intent better.

Thanks for the update, I'm happy if Maskray is.

MaskRay accepted this revision.Oct 10 2019, 6:53 AM
This revision is now accepted and ready to land.Oct 10 2019, 6:53 AM
MaskRay added inline comments.Oct 10 2019, 6:55 AM
lld/ELF/Driver.cpp
1919

not removal of unused shared objects

it is to change the symbol kind

MaskRay added inline comments.Oct 10 2019, 7:18 AM
lld/ELF/Driver.cpp
1919

// Garbage collection and removal of shared symbols from unused shared objects.

Pushed with MaskRay's latest wording. Thanks.

russell.gallop marked 2 inline comments as done.Oct 10 2019, 7:49 AM
This revision was automatically updated to reflect the committed changes.