Removing nested function from elfxx-aarch64.c
Eric Botcazou
botcazou@adacore.com
Wed Mar 19 13:58:34 GMT 2025
> It very much depends on the platform. From the gcc internals manual:
>
> {Target Hook} int TARGET_CUSTOM_FUNCTION_DESCRIPTORS
> If the target can use GCC's generic descriptor mechanism for nested
> functions, define this hook to a power of 2 representing an unused bit
> in function pointers which can be used to differentiate descriptors at
> run time. This value gives the number of bytes by which descriptor
> pointers are misaligned compared to function pointers. For example, on
> targets that require functions to be aligned to a 4-byte boundary, a
> value of either 1 or 2 is appropriate unless the architecture already
> reserves the bit for another purpose, such as on ARM.
The discussion was more about requiring an executable stack in the mere
presence of nested functions though, as opposed to in the presence of pointers
to them (for which TARGET_CUSTOM_FUNCTION_DESCRIPTORS is indeed designed).
--
Eric Botcazou
More information about the Binutils
mailing list