Cross-Compiling Help
Ruppert
dieter_ruppert@siemens.com
Thu Dec 19 10:51:00 GMT 2002
Hi,
>
> btw, We have used the "size" utility and it shows that our two binaries have
> the same segment/section sizes. That only proves the sizes are the same and
> not the segment/section contents. If we can show that the segment/section
> contents are the same, does this prove that the binaries are effectively the
> same? Is there a way to compare section/segment content?
I once used the objcopy utility for something similar (it is part
of binutils). I could extract the code section (.text) into a
separate file (using objcopy -j .text ...) and then I simply
used cmp to do the binary comparison. cmp prints the offset of
the differences (if any), and these can be matched against a link mapfile
to locate the objects which cause the difference. With this
information in turn I used objdump on the objects to locate the
differences in machine code.
This, of course, is only feasible for a small number of differences.
---------------------------------------------------------------------
Regards
D.Ruppert
RTS GmbH
More information about the Gcc-help
mailing list