[PATCH] Support SHF_GNU_RETAIN ELF section flag
Pedro Alves
pedro@palves.net
Tue Sep 29 13:48:13 GMT 2020
On 9/29/20 2:18 PM, Michael Matz wrote:
> We should remember that this thread is about the addition of the section
> flag, which affects but isn't directly related to how it's going to be
> used in source code in a high level language. If it's the pre-existing
> "used" or a new "retain" attribute, or an attribute at all or just left to
> section markers or pragmas: a discussion about that doesn't need to hold
> up the addition of the ELF feature.
I never suggested that it should (hold up the ELF feature). I was
replying to this in the original message:
> The overall intention for this new flag is to enable a new "retain"
> attribute to be applied to declarations of functions and data in the
> source code. This attribute can be used to ensure the definition
> associated with the declaration is present in the linked output file,
> even if linker garbage collection would normally remove the containing
> section because it is unused.
Discussing the intention of a new proposed mechanism seems apropos.
Sometimes the high level usage model influences the low level design too.
More information about the Binutils
mailing list