Re: "magic numbers incorrect" error trying to use atos on i386 binary
Re: "magic numbers incorrect" error trying to use atos on i386 binary
- Subject: Re: "magic numbers incorrect" error trying to use atos on i386 binary
- From: Greg Guerin <email@hidden>
- Date: Sat, 13 May 2006 06:55:38 -0700
Greg Hurrell wrote:
>I understand from this that I should be able to use atos on a PowerPC to
>convert i386 addresses to symbols, provided I have a stripped copy of the
>binary for that architecture. Yet it's not working. Works fine for the ppc
>portion of the executable. Do I have to set up an i386 machine in order to
>do this? Any suggestions? A Google search for "mach header magic numbers
>incorrect in header" returns zero hits!
As I understand it, the problem is the fat (Universal) binary. You have to
use 'lipo' to extract only the i386 component, making a thin (i386-only)
binary file. With that, 'atos' should work.
See 'man lipo' for info on how a thin macho is turned into fat macho, and
vice versa. The reason the "magic numbers" message arises is that fat
macho has different magic numbers in its header than any thin macho.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden