Re: Tuple and changes for m68k with -malign-int

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.ports.68k,gmane.comp.lib.glibc.user,gmane.linux.ports.m68k
Message-ID <75c912630ade4e05af08eab9584c6f56d7c0ca1f.camel@physik.fu-berlin.de>
Hi Geert,

On Mon, 2025-05-19 at 09:42 +0200, Geert Uytterhoeven wrote:
> > AmigaOS doesn't use ELF though, it uses COFF. And Amiga Unix, which uses
> > ELF, has a default alignment of 4 bytes as specified by the AT&T ABI.
> 
> Initially Linux didn't use ELF either, but a.out.

Yes, the same applies for NetBSD. This also becomes obvious that the
NetBSD header on m68k is called "netbsd-elf.h", instead of just "netbsd.h".

> SunOS4 (based on BSD) did use 2-byte alignment on m68k, so I am still
> surprised NetBSD didn't follow suit.

When NetBSD still used a.out, it actually used 2 bytes alignment. They
switched over when they switched from a.out to ELF, see:

https://wiki.debian.org/M68k/Alignment

> SunOS5 (based on SVR4) no longer supported m68k.

True. I would now be really interested to find out what my Sony NEWS
machines use on m68k. According to Wikipedia, it's based on SVR4, so
I assume it uses ELF with 4 bytes alignment, see:

https://en.wikipedia.org/wiki/UNIX_System_V#SVR4

There is also an Atari Unix which I would like to test as well.

> I expect (the history of) the gcc sources would tell you more about
> the default alignment on other (legacy UNIX) OSes supporting m68k...

Good idea. I will do that. My assumption is that on Linux, GCC developers
actually just forgot to switch alignment from 2 to 4 bytes with the switch
to ELF unlike NetBSD.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.