This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: objcopy fails for Win64


Hi NightStrike,

Can someone help us debug why the simple objcopy test fails for the
target x86_64-pc-mingw32?

Executing on build: cmp tmpdir/testprog.exe tmpdir/copyprog   (timeout = 300)
tmpdir/testprog.exe tmpdir/copyprog differ: byte 137, line 2
tmpdir/testprog.exe tmpdir/copyprog differ: byte 137, line 2

Have you looked at the differing byte (or bytes if it turns out that there is more than one of them) ? Try running readelf and objdump on the two binaries and comparing the outputs. If that does not show up the reason for the discrepancy then you will have to generate a hex dump up to offending byte and then try to debug the meaning of the bytes by hand. The problem almost always turns out to be:


  * An uninitialized byte in a header which gets written to disk.
  * A timestamp.
  * A 32-bit assumption tripping up on a 64-bit machine.

Cheers
  Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]