Re: Dwarf and comparing binaries
Re: Dwarf and comparing binaries
- Subject: Re: Dwarf and comparing binaries
- From: Peter O'Gorman <email@hidden>
- Date: Sun, 25 Nov 2007 17:06:21 -0600
Jonas Maebe wrote:
>
> On 24 Nov 2007, at 21:33, Peter O'Gorman wrote:
>
>> Peter O'Gorman wrote:
>>>
>>> The linker adds a UUID to the object files. Try adding -no_uuid to the
>>> link flags. You might need to -Wl,-no_uuid, I have not checked if gcc
>>> passes the flag through.
>>
>> I just did a quick check, you do not need -Wl,. However note that the
>> final output will differ if you are doing:
>> cc -o c c.c -g -no_uuid
>> i.e. without an intermediate object file. I guess the path to the
>> temporary object file is stored in the debugging info. Likely dsymutil
>> will help here. However:
>> cc -c -o c.o -g c.c
>> cc -o c c.o -no_uuid
>> Should give you identical output each time.
>
> Note that I'm not using gcc, as our compiler is self-hosting. Unlike
> gcc, it does not use random filenames for intermediate files, so those
> already always have the same name and are always stored in the same
> location (the latter because the makefile places them in the same
> location every time).
Yeah, the above worked for my (probably too simple) test. I can only
suggest that you build as normal, then for the comparison stage, copy
what is to be compared and run:
strip -S -arch all -no_uuid
on the copied files, then compare the copies.
You could also inspect the linker sources at:
http://www.opensource.apple.com/darwinsource/10.5/ld64-77/src
And, since gcc also does comparison of output at various stages of the
build, for similar purposes, you could check what they are doing.
Sorry I can't be of any more help,
Peter
--
Peter O'Gorman
http://pogma.com
_______________________________________________
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