Universal Mach-O target for BFD
David Daney
ddaney@caviumnetworks.com
Thu Oct 8 23:45:00 GMT 2009
Ryan Govostes wrote:
> I noticed that GDB 7, while it supports single-architecture Mach-O
> files, does not like "universal" (fat) binaries.
>
> I haven't done any hacking on gdb / binutils before, so I'm not sure of
> the extent of changes that need to be made. I expect it's something like,
>
> 1. Add support for universal binaries to BFD.
> 2. Add flags to GDB to select which architecture to extract.
>
> For the first one, I'm not sure if there is precedent in BFD on how to
> handle fat binaries, but here's the gist of how a multiarchitecture file
> is laid out[1] (all in big-endian byte ordering):
>
>
> 1. The 4-byte magic number 0xCAFEBABE.
OT: Nice. The same magic as java class files. I wonder which came first.
David Daney
More information about the Binutils
mailing list