2 ms·
There’s a walkthrough of the relevant kernel code in the superb “How programs get run” series[1], and it seems to try for 16-byte alignment on all platforms. N
by mananaysiempre 5y ago
There’s a walkthrough of the relevant kernel code in the superb “How programs get run” series[1], and it seems to try for 16-byte alignment on all platforms.
Normally this kind of thing would be in the relevant System V ABI Processor Supplement (officially, by way of the SVID and gABI, but everybody just refers to the psABI directly) [2], in the “Process Initialization” section (the above-mentioned §2.3), but note e.g. the story of how the GCC developers accidentally defaulted to a stricter alignment than the spec said and then decided to just run with it and rewrite the spec after the fact[3].
[1] https://lwn.net/Articles/631631/ https://lwn.net/Articles/631631/
[2] E.g. https://gitlab.com/x86-psABIs https://gitlab.com/x86-psABIs for x86
[3] https://stackoverflow.com/a/49397524 https://stackoverflow.com/a/49397524