Re: Symbol stripping tips + handy script
Re: Symbol stripping tips + handy script
- Subject: Re: Symbol stripping tips + handy script
- From: "Andy O'Meara" <email@hidden>
- Date: Wed, 22 Mar 2006 12:43:17 -0500
- Thread-topic: Symbol stripping tips + handy script
I'm pretty sure that the PC addresses reported in a stack trace (3rd column)
are independent of if it's a universal or thin binary (which is to say that
it's independent/transparent to how the loader got it from disk, etc). So
the only question left is how smart atos is at turning relative offsets into
symbols for a given arch. From the apple page on the subject:
http://developer.apple.com/technotes/tn2004/tn2123.html#SECNOSYMBOLS
// snip
IMPORTANT: atos does not currently support a -arch command line option; for
a universal binary, it always works with the current architecture (r.
4086505). Until this limitation is lifted, if you need to do
cross-architecture address-to-symbol mapping, the best approach is to use
lipo to extract a temporary copy of the code for the relevant architecture,
and then run atos against that.
// snip
So to return to our original point, I would agree with you that it makes
just as much sense to retain the "full" thin binaries than the single full
universal binary (although, technically, you're always just one lipo call
away from turning that universal binary into thin binaries you can use with
atos).
Any atos gurus here know if/when Apple will add -arch to atos? (apparently,
it's rdar://4086505). In all honesty, I don't see much of a problem
considering how easy it is to use lipo when needed.
Andy
On 3/22/06 9:35 AM, "Greg Hurrell" <email@hidden> wrote:
> El 22/03/2006, a las 12:51, Greg Hurrell escribió:
>
>> El 22/03/2006, a las 2:24, Hugh Sontag escribió:
>>> Is it possible to strip a universal binary, rather than have to
>>> strip each "thin" binary first, and then combine them?
>>>
>>> Is there any downside to stripping the universal binary?
>>
>> I too am interested in knowing your reasons for splitting the
>> universal, stripping and then recombining. I've always just
>> stripped the universal.
>
> To answer my own question, one reason that occurs to me is that it
> might be useful to have thin binaries lying around when you have to
> decipher crash reports from users running on different architectures.
>
> ie. if you're running on ppc and a user sends in an i386 crash
> report, you'd run atos on the i386 thin binary; if you try running it
> on the universal binary then atos will by default work with the ppc
> portion of the binary, probably giving you the wrong results.
>
> Andy's script, as provided, doesn't keep the thin, unstripped
> binaries lying around. It instead just keeps the unstripped universal
> binary. I think it would be a good idea to modify it so that it kept
> the thin binaries instead.
>
> Cheers,
> Greg
>
>
> _______________________________________________
> 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
_______________________________________________
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