Cross-Compiling Help

Kerr Shannon-SKERR1
Thu Dec 19 13:06:00 GMT 2002

Well, I was able to extract the .text section thanks to the suggestion from
Ruppert (thanks).  The comparison wasn't pretty.  Actually, I am trying just
a simple "hello_world" type program and the diff of the objdump didn't look
good at all.  Ruppert, can you or anyone else tell me how to get the map
file using gcc?  I'm not familiar with the GCC toolset and I would like to
see the difference between the map files for the two objects.

Also, we compared the assembly code generated by gcc (gcc -S) and the code
generated by the cross-compiler gcc and the native gcc were identical!  We
then executed gcc -c for each and compared the unlinked binaries (assembled
code) and the two binaries were again an exact match.  But when we go to
link the objects (gcc -o foo.o foo.c), that's when everything changes.

The stripped binaries match in size, but using cmp to compare the two, they
do not match.  I compared the objdumps and they do match up to a point and
then the rest of the file does not match (only about 1/10th match and then
the assembly instructions are very different after that).

I really appreciate everyone's help in this.


Mr. Shannon Kerr

More information about the Gcc-help mailing list