[RFC] SHF_GNU_RETAIN ELF Section Flag

Carlos O'Donell carlos@redhat.com
Wed Sep 16 12:58:41 GMT 2020


On 9/15/20 12:52 PM, Jozef Lawrynowicz wrote:
> I suppose the most compelling use cases for SHF_GNU_RETAIN are when the
> dependency cannot be expressed with references to ELF sections. You
> can't use SHF_GROUP because there is nothing to group the section with.

GRP_KEEP - Group of sections to always keep. Never discarded if included
           in the link.

The benefit is you can give them a logical group name e.g. "cpu_features"
and have more than one of them for accounting/documentation purposes.

You can implement a "KEEP" source markup based on gas' .section directive?

-- 
Cheers,
Carlos.



More information about the Gnu-gabi mailing list