Re: Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k
Hi Adrian,
On Sat, 7 Jun 2025 at 11:44, John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> On Fri, 2025-06-06 at 20:20 +1000, Finn Thain wrote:
> > Whereas, the ability to use old binaries is proof that we care about rule
> > #1 don't break userspace.
>
> Who is "we"? The official(!) ABI says that pointers are supposed to be aligned
> with 4 bytes, not 2 bytes. It's the current implementation that violates the
> ABI, not what I want to achieve which is make Linux/m68k adhere to the official
> specification.
"The official(!) ABI"...
Official according to what and to who?
There are de jure and de facto standards.
There's a lot of discussion and talking next to each other about
"the ABI", and which ABI applies to what...
The SVR4 ABI applies to systems claiming compatibility with SVR4, which
was (AFAIK) never a goal for Linux. Before that, there were other ABIs
used by various UNIX systems (BSD, SYSV, ...) and non-Unix systems
(AmigaOS, Atari TOS, MacOS, ...).
>From its inception, Linux/m68k used an ABI compatible with SunOS,
which dates back to the MC68000, and was probably the most popular
UNIX OS running on m68k at that time. Several other UNIX vendors
followed a similar path, starting from the MC68000. E.g. the HP-UX
Portability Guide[1] states that HP-UX on HP9000/300 (based on SVR2
at that time, apparently) uses an alignment of 2 bytes, too.
SVR4 was an attempt to consolidate the various flavors of UNIX at
that time (with BSD and SYSV being the two largest flavours), and
"rebooted" the ABI. Binary-compatibility with older versions was
ignored, as the UNIX landscape was wildly differing anyway, and
people cared mostly about source-compatibility.
Linux has a strong history of not breaking the ABI between kernel and
user space, so changing that ABI is a no-go. What you do in the layers
above (in the kernel), or above (in userspace) is something different...
[1] http://www.bitsavers.org/pdf/hp/9000_hpux/7.x/98794-90047_HP-UX_Portability_Guide_Sep89.pdf
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Reply to: