HomePhabricator

[LLD][ELF] /DISCARD/ output sections should not be orphans

Description

[LLD][ELF] /DISCARD/ output sections should not be orphans

/DISCARD/ output sections were being treated as orphans. As a result, if
a /DISCARD/ output section has been assigned a PHDR, it could cause
incorrect assignment of sections to segments.

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