HomeFreeBSD

lld: [ELF] Remove unused synthetic sections from script commands

Description

lld: [ELF] Remove unused synthetic sections from script commands

Script commands are processed before unused synthetic sections are
removed. Therefore, if a linker script matches one of these sections
it'll get emitted as an empty output section because the logic for
removing unused synthetic sections ignores script commands which
could have already matched and captured one of these sections. This
patch fixes that by also removing the unused synthetic sections from
the script commands.

Discussed with: dim
Obtained from: LLVM r307037
Sponsored by: The FreeBSD Foundation

Details

Provenance
emasteAuthored on
Parents
rS320648: Add a delay count to the last few places. This will help make MULTIDELAY
Branches
Unknown
Tags
Unknown