Subject: Re: NetBSD ABI and library calls
To: <>
From: Martin Husemann <>
List: tech-kern
Date: 10/30/2005 08:27:33
On Sun, Oct 30, 2005 at 02:20:03PM +1100, wrote:
> How is it done in NetBSD?  Is there some kind of "ABI" like the SysV

Yeah, we typically follow the ELF ABI for most architectures (you did post
to tech-kern instead of port-i386, but since you talk about assembler calls
you probably know that this is machine depended - for example on sparc{,64}
you do not create call frames at all, but just stick arguments in registers
and issue a trap instruction).

Two possible off-topic hints, while here:

 - if you are implementing your own syscalls, you probably want to adopt
   the SYS.h magic
 - if you are calling "standard" syscalls, it is sometimes better (or
   even necessary) to instead call the libc syscall stub, because
   libpthread intercepts those calls to do it's magic.