On Wed, 2025-09-10 at 09:34 +0200, Geert Uytterhoeven wrote:
Isn't m68k the only architecture that's weird like this?
Yes, and it does this on Linux only. I have been trying to change it upstream though as the official SysV ELF ABI for m68k requires a 4-byte natural alignment [1].
M68k does this on various OSes and ABIs that predate or are not explicitly compatible with the SysV ELF ABI.
I know. I was talking in the context of SysV ELF systems.
Other architectures like CRIS (1-byte alignment!) are no longer supported by Linux.
Yes, that's why we should take care of the alignment ;-).
FWIW, doubles (and doublewords) are not naturally aligned in the SysV ELF ABI for i386, while doubles (no mention of doublewords) are naturally aligned in the SysV ELF ABI for m68k.
I wouldn't consider i386 a role model for us ;-).
Adrian