Post #4028179
2026-07-22 21:45 UTC
@brouhaha@mastodon.social @revk@toot.me.uk
>I am slightly curious as to whether the GCC implementation uses a display vector, or a static link in the stack frame.
It is a stack chain but it is "unnested" so the stack chain is really just a struct these days. For pre-GCC 4.0, it was a full stack link that was passed to the functions.
The "unnesting" is done in tree-nested.cc.
For nested function which are called indirectly information is below:
For some ABIs (e.g. powerpc64 ABIv1 [maybe ABIv2 too]), since there is already a fat pointer for function pointers (with an context pointer), it will use that.
For others, it uses the stack and for others still it will use statically allocated function pointers (aarch64 darwin) [this is swappable to compile time even].
Replies (0)
No replies.