Messages in this thread | | | Subject | Re: Mach-O binary format support and Darwin syscall personality [Was: uts banner changes] | From | Benjamin Herrenschmidt <> | Date | Wed, 13 Dec 2006 09:21:23 +1100 |
| |
> The PPC syscall stuff on the other hand is fairly straightforward. > The code loads the argument registers (which I _think_ follow the > same syscall ABI on Linux and Darwin due to somebody having a flash > of inspiration and putting that recommendation in the PPC spec > documents)
I wouldn't bet on that ... they might look the same but it's likely that there will be subtle differences. There are definitely differences between the PEF ABI used on MacOS < X (and useable in OS X with a special loader) and the SysV ABI we use in Linux. The differences generally are around those areas:
- stack frame format (hopefully should be irrelevant for syscalls, well, I hope so ...) - va_args format (same) - passing or returning function arguments larger than the native int size (passing 64 bits values, passing structures by values) (r3/r4 vs. stack for example). - TOC/TLS/whatever is in r2, r12 and r13 ...
I would expect most of these but not all to be irrelevant for syscalls.
Now, I don't know precisely what the mach-o ABI looks like, we might be lucky and it may be similar to ours. PEF is not, but then, PEF isn't native in OS-X, they use a special loader/wrapper for it.
Also, beware that there are two different ABIs (both in linux and in mach-o) for 32 and 64 bits binaries.
Ben.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |