Post #3213155
2023-11-03 22:43 UTC
@gsuberland@chaos.social @mos_8502@oldbytes.space @thamesynne@dragon.style @thephd@pony.social I expect it’s different on different ISAs, for x86 it’s what’s labeled as CDECL at https://en.m.wikibooks.org/wiki/X86_Disassembly/Calling_Conventions
(Sorry I couldn’t link the specific subheading)
Replies (1)
-
@gsuberland@chaos.social 2023-11-03 22:52
@ShadSterling@mastodon.social @mos_8502@oldbytes.space @thamesynne@dragon.style @thephd@pony.social that's sort of my point. cdecl is the default convention for C on x86-32 only, and even that isn't well-specified. the actual behaviour for Linux binaries is simply de-facto set to whatever GCC implements, so specifics of stack alignment requirements vary depending on the compiler version. if you're on any other arch, the default convention is different - it's either compiler-specific, or architecture-specifed. so C really isn't special here.