HomePhabricator

[ELF][ARM] Fix crash when discarding InputSections that have .ARM.exidx

Description

[ELF][ARM] Fix crash when discarding InputSections that have .ARM.exidx

When /DISCARD/ is used on an input section, that input section may have
a .ARM.exidx metadata section that depends on it. As the discard handling
comes after the .ARM.exidx synthetic section is created we need to make
sure that we account for the case where the .ARM.exidx output section
should be removed because there are no more live input sections.

Differential Revision: https://reviews.llvm.org/D67848