This change introduces support for zero flag ELF section groups to lld.
lld already supports COMDAT sections, which in ELF are a special type of
ELF section groups. These are generally useful to enable linker GC where
you want a group of sections to always travel together, that is to be
either retained or discarded as a whole, but without the COMDAT
semantics. Other ELF linkers already support zero flag ELF section
groups and this change helps us reach feature parity.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lld/test/ELF/gc-sections-group-debug.s | ||
---|---|---|
11 ↗ | (On Diff #323482) | This tests a real world use case, .debug_types which has the GRP_COMDAT flag. You can add another section to gc-sections-group.s |
lld/ELF/InputFiles.cpp | ||
---|---|---|
621 | That makes sense, I've renamed this to keepGroup. |
This comment was removed by mehdi_amini.
I wonder whether isNew is a bit misnamed nowadays. Perhaps it should be renamed to keepGroup or something like that. Waht do you think?