This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Do not crash with --emit-relocs and --icf=all together.
ClosedPublic

Authored by grimar on Feb 13 2018, 8:26 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Feb 13 2018, 8:26 AM
ruiu added a comment.Feb 13 2018, 10:39 AM

replace is not designed to be smart, and adding new code there seems semantically incorrect, as replacing some section doesn't necessarily mean that its dependent sections should be marked as dead.

You could instead add code to ICF.cpp.

grimar updated this revision to Diff 134859.Feb 19 2018, 1:01 AM
  • Addressed comments.

replace is not designed to be smart, and adding new code there seems semantically incorrect, as replacing some section doesn't necessarily mean that its dependent sections should be marked as dead.

You could instead add code to ICF.cpp.

Thanks, with that I was able to simplify code a bit more.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 23 2018, 2:30 AM
This revision was automatically updated to reflect the committed changes.