I created a very simple C++ file that I am compiling. My problem is
that on Linux (using a cross compiler) and on Windows, different
assembly code is produced. Here is the code, even though this can be
compiled with gcc I am curious as to why g++ has a problem.
I noticed that the COFF files are both different, using HT
(hte.sourceforge.net) I noticed that on Linux, the COFF file has an
extra section called "/4". This is not on the other object file
compiled in Windows with g++.
I built my cross compiler using the script on the Mingw wiki (3.4.4)
but the problem also existed with 3.4.2.
I use the following to produce the code:
g++ -Wall -O2 -c testfile.cpp -o testfile.o
and on Linux
i586-mingw-g++ -Wall -O2 -c testfile.cpp -o testfile.o
Maybe this is a stupid question, but does anyone know what I'm doing wrong?
Thanks in advance,