Re: Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k
On Fri, 2025-06-06 at 09:01 +0200, Geert Uytterhoeven wrote:
> On Thu, 5 Jun 2025 at 12:33, Martin Husemann <martin@duskware.de> wrote:
> > On Thu, Jun 05, 2025 at 10:49:08AM +0200, Anders Magnusson wrote:
> > > Just curious; does not Linux use the processor-specific flagging in the
> > > binary that can tell whether it's 16- or 32-bit-aligned (and handle it
> > > thereafter)?
> > >
> > > NetBSD changed VAX from 1k to 4k pages quite some time ago, and to be able
> > > to use both we added a new id for 4k pages.
> >
> > Or add an ELF note to all new binaries - we do that on sparc64 to mark
> > the compiler memory model used and give all binaries w/o the note
> > (or a note that it is using "medlow") a different VA memory layout (to
> > keep shared libs in range of the instructions used there, but defeating
> > most of ASLR).
>
> Op MIPS N32 (EF_MIPS_ABI2), which also uses different syscall numbers.
> Then the kernel has to take care of the translation.
Why not just add a kernel option to allow building the m68k kernel with 4 bytes
alignment? Anyone who still wants to keep 2 bytes alignment can continue to do
so.
The same would apply for gcc and glibc. Both can offer a configure option to set
the default alignment to 4 bytes. This way everyone who wants to continue using
2 bytes alignment can continue to do so without further ado.
And anyone else who wants to switch alignment, can just do so.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: