The author, and anyone else interested in exploring Mach-O files, might want to check out the otool command on Mac OS X. The otool source code is open source: <a href="http://www.opensource.apple.com/source/cctools/cctools-870/otool/" rel="nofollow">http://www.opensource.apple.com/source/cctools/cctools-870/o...</a>
someone made a mach-o lib for ruby:
<a href="https://github.com/woodruffw/ruby-macho" rel="nofollow">https://github.com/woodruffw/ruby-macho</a>
You might dig this Alex:<p><a href="https://github.com/cebix/macemu/blob/master/BasiliskII/src/Unix/Darwin/lowmem.c#L109" rel="nofollow">https://github.com/cebix/macemu/blob/master/BasiliskII/src/U...</a>
Many years ago, I wrote something about Universal Binaries - <a href="http://hohle.net/scrap_post.php?post=197" rel="nofollow">http://hohle.net/scrap_post.php?post=197</a> . IIRC, they've remained relatively unchanged since NeXTSTEP and have always been available in OS X (and even used during the G3/G4/G5 era in Mac OS).
Related: <a href="https://github.com/shinh/maloader" rel="nofollow">https://github.com/shinh/maloader</a> is a loader for running mach-o files on Linux.