Re: Mach-O binary format support and Darwin syscall personality [Was: uts banner changes]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux