This is an archive of the discontinued LLVM Phabricator instance.

[ELF] ICF should respect section alignment
ClosedPublic

Authored by phosek on Aug 19 2016, 5:30 PM.

Details

Summary

When performing ICF, we have to respect the alignment requirement of each section within each group.

Diff Detail

Event Timeline

phosek updated this revision to Diff 68752.Aug 19 2016, 5:30 PM
phosek retitled this revision from to [ELF] ICF should respect section alignment.
phosek updated this object.
phosek added reviewers: ruiu, rafael.
phosek added a project: lld.
phosek added subscribers: llvm-commits, phosek.

Just for reference, this issue was originally reported by Rafael against gold and has recently bitten Chromium, after checking lld implementation Roland McGrath noticed that it has the same problem.

ruiu accepted this revision.Aug 20 2016, 12:28 AM
ruiu edited edge metadata.

LGTM

ELF/ICF.cpp
307

Remove else after return.

This revision is now accepted and ready to land.Aug 20 2016, 12:28 AM
phosek updated this revision to Diff 68797.Aug 20 2016, 10:52 PM
phosek edited edge metadata.
phosek marked an inline comment as done.
This revision was automatically updated to reflect the committed changes.