AFAIK, the native Darwin binary tools are part of the cctools package. They don't have the same command line syntax or output as the GNU binutils. Later binutils (i.e., 2.22) supports the Mach-O format however. You can get these prebuilt, with the 'g
' prefix to the tool names, as mentioned here. Alternatively, you can compile binutils, with something like:
> ./configure --prefix=$CROSSTOOLDIR --target=x86_64-apple-darwin
--enable-64-bit-bfd --disable-nls --disable-werror
Installation will yield a bin/
directory where the utilities are prefixed with x86_64-apple-darwin
. It should handle i386 Mach-O format (and FAT binaries) fine.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…