discuss-gnustep
[Top][All Lists]
Advanced

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

Re: universal binaries


From: Markus Hitter
Subject: Re: universal binaries
Date: Sun, 14 Jan 2007 11:05:27 +0100


Am 13.01.2007 um 19:04 schrieb Rogelio Serrano:

How does apple do it?

Universal binaries are two or more ordinary binaries in a row, together with a header in front of it. All this is put into one file.

To launch a Universal Binary (UB), the kernel's execve() recognizes the UB header in addition to ordinary binaries (and scripts). If execve() finds such a header, it sets a file offset to the binary matching the current architecture and starts over.

With Mach-o?

I don't think this is limited to some sort of ABI other than by patent issues. In principle, you should even be able to stitch together mach-o and ELF binaries. You'd have to modify the current Mac OS X kernel to get this working.

is it enough to compile and cross
compile and just put them all together in an application bundle?

No.

The stitching tool is named "lipo", to help your googling.


HTH,
Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/








reply via email to

[Prev in Thread] Current Thread [Next in Thread]