• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dwarf and comparing binaries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dwarf and comparing binaries


  • Subject: Re: Dwarf and comparing binaries
  • From: Jonas Maebe <email@hidden>
  • Date: Sat, 24 Nov 2007 21:22:13 +0100


On 24 Nov 2007, at 20:57, Peter O'Gorman wrote:

Jonas Maebe wrote:


It seems that every time you compile a binary with Dwarf debug info, it
ends up being slightly different. I guess the linker includes some time
stamps of the object files or some such in the final binary. Is there a
way to avoid this? Running dsymutil doesn't help.



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.

Thanks for the suggestion, but this didn't help. FWIW, all differences are located in the __LINKEDIT segment, which doesn't seem to be contain any sections:


Load command 4
      cmd LC_SEGMENT
  cmdsize 56
  segname __LINKEDIT
   vmaddr 0x00242000
   vmsize 0x00183000
  fileoff 2338816
 filesize 1582712
  maxprot 0x00000007
 initprot 0x00000001
   nsects 0
    flags 0x0

Here are some differences (output from cmpl -l, the __LINKEDIT segment starts at 2338816).

Between binary 2 and 3:

2338849 336 367
2339149 310 341
2392717 310 341
2393821 326 356
2394013 320 351
...
2741521 335 366
2741701 335 366
2742541 335 366
2745181 335 366
2745937 335 366


Between binary 3 and 4:

2338849 367  21
2338850 203 204
2339149 341 372
2392717 341 373
2393821 356  10
...
2742542 203 204
2745181 366  20
2745182 203 204
2745937 366  20
2745938 203 204

Does otool or something else possibly have a way to present the __LINKEDIT segment in an human-friendly way? Since I don't see a section name, the -s option doesn't seem to apply.


Jonas _______________________________________________ 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
References: 
 >Dwarf and comparing binaries (From: Jonas Maebe <email@hidden>)
 >Re: Dwarf and comparing binaries (From: Peter O'Gorman <email@hidden>)

  • Prev by Date: Re: memberd and lookupd
  • Next by Date: Re: memberd and lookupd
  • Previous by thread: Re: Dwarf and comparing binaries
  • Next by thread: Having trouble with MallocDebug...
  • Index(es):
    • Date
    • Thread