Subject: N32 support
To: None <port-mips@netbsd.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: port-mips
Date: 12/16/2001 19:37:18
One day I'll need N32 support for COMPAT_IRIX. What is our position
about N32: Do we want to also support N32 for native binaries? Is gcc
able to produce N32 binaries yet?

Next question: how to implement it? As far as I understand it now, this
is only about having a different trap frame, and modifying
mips/syscall.c and mips/trap.c  to handle the N32 trap frame. Am I
missing something? (escpecially about values passed through registers,
maybe?)

We also have to distinguish between O32 and N32 binaries. The problem is
about detecting N32 binaries when we launch them, then we can use a flag
in field mdflags of struct mdproc.

For IRIX binaries, things are simple, the ELF interpreter is different:
it's /lib/libc.so.1 for o32 and /lib32/libc.so.1 for n32 (and
/lib64/libc.so.1 for n64). 

For native binaires, how can we do? We don't have native N32 binaries
yet, but maybe we could decide to have a particular ELF section in them
to distinguish them?

About libraries: if we support native dynamic N32 binaries, then we need
N32 libraries, just like IRIX does. Do we have any plan for this? And
even for static binaires, we need a N32 libc.a to link the binary,
right?

Last but not least: if I did not missed too much things with my
trapframe idea, where can we find documentation about what should be in
the N32 trapframe exactly? 

-- 
Emmanuel Dreyfus.
"Of course, it runs NetBSD" -- http://www.netbsd.org
manu@netbsd.org