HomePhabricator

[ELF] Support -r --gc-sections

Authored by MaskRay on Jul 23 2020, 8:16 AM.

Description

[ELF] Support -r --gc-sections

-r --gc-sections is usually not useful because it just makes intermediate output
smaller. https://bugs.llvm.org/show_bug.cgi?id=46700#c7 mentions a use case:
validating the absence of undefined symbols ealier than in the final link.

After D84129 (SHT_GROUP support in -r links), we can support -r
--gc-sections without extra code. So let's allow it.

Reviewed By: grimar, jhenderson

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

Details

Committed
MaskRayJul 23 2020, 8:16 AM
Reviewer
grimar
Differential Revision
D84131: [ELF] Support -r --gc-sections
Parents
rG23d1800433d9: [gn build] Port 92874d28669
Branches
Unknown
Tags
Unknown