Recommit "[ELF] - Do not crash with --emit-relocs and --icf=all together."
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 23 Feb 2018 10:37:33 +0000 (10:37 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 23 Feb 2018 10:37:33 +0000 (10:37 +0000)
commit2d53967b486fa213613f4ced6b3087050997b82b
treed3d5071d3a95c071e6d248e13db16b37802019d2
parentaa359f87e81b349882ae75a5e940b225d6f7fe27
Recommit "[ELF] - Do not crash with --emit-relocs and --icf=all together."

Latest patch version now.

Original commit message:

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

Previously we would crash because did not mark .rel[a] sections
as dead and they tried to access parent which was not live
after ICF and therefore was null.

Differential revision: https://reviews.llvm.org/D43241

llvm-svn: 325879
lld/ELF/ICF.cpp
lld/test/ELF/emit-relocs-icf.s [new file with mode: 0644]