Subject: Re: new snapshot
To: Frederick Bruckman <fredb@immanent.net>
From: Todd Vierling <tv@wasabisystems.com>
List: port-mac68k
Date: 01/14/2002 13:09:25
On Mon, 14 Jan 2002, Frederick Bruckman wrote:

: > COMPAT_AOUT != COMPAT_AOUT_M68K.
: >
: > a.out binaries on m68k have a different struct-alignment value from ELF, so
: > syscalls on a.out really *are* different from those on ELF for m68k.
: > There's an honest-to-goodness translation going on; see
: > src/sys/compat/aoutm68k.
:
: Ahh... that's very different, then. :-)
:
: So let me see if I understand something... You could enable EXEC_ELF32
: on an a.out kernel, and it would be harmless to a.out binaries,
: because all the old syscalls still have a.out struct alignment -- but
: you can't really run ELF binaries until you've *built* and *booted* an
: ELF kernel, because there is no COMPAT_ELF_M68K? (Catch-22?)

Correct.  ELF binaries will align structs on a wider bit boundary for
several syscalls.  It's not a catch-22, since you can build an ELF m68k
kernel easily with the new toolchain on any host platform.  (The a.out->ELF
transition is meant to be one-way.)

Note that if a platform happens to need an "ELF-to-a.out translator" in
order to load a kernel properly (objcopy or elf2aout equivalent), the
compiled code will fortunately still use ELF alignment, and thus still
function as if it were an ELF kernel.

: And once you do that, build and boot an ELF kernel, then you must have
: built it with COMPAT_AOUT_M68K in order for a.out binaries to work right?

Correct.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi & NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/