Frank Hofmann wrote:

But do you know where i can find the x86 ABI that Solaris uses?

You might've noticed that neither the AMD64 ABI nor the i386 ABI anywhere mention the system call mechanism (apart from the _exit special case in the i386 ABI, where it says you can 'lcall 7, $0'). It is deliberately undocumented, so that operating systems are free to choose the fastest method to perform a system call, and/or change that method, at any time.

If you want to know how a specific UNIX-style OS performs system calls, you can't look at the ABI document - but you'll have to look at the sourcecode for the OS' syscall handler and/or the actual binary of libc.

The calling conventions (it says "function calling sequence") for library interfaces that are described in the ABI are not the same as the system call mechanism. This is particularly obvious on Linux (where the 32bit userland ABI uses the 'normal' stack parameter passing while the system call mechanism passes args in regs), but also on Solaris (where you have multiple different ways of performing system calls).

Thanks for your clarification. Thus I can explain why Linux uses it's own way passing parameters by registers. :-)

--
Cheers,

----------------------------------------------------------------------
Oliver Yang | [EMAIL PROTECTED] | x82229 | Work from office

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to