Changing COFF file endianess

jshammond@my-Deja.com
Thu Feb 17 15:54:00 GMT 2000


I am making a m68k-coff compiler that runs
on our NT system.  It creates the coff file
with no problems, except that the format
is big endian.  Not surprising since m68k
is a big endian machine.  However, the NT 
based tool that needs the coff file accepts
little endian coff files, not big endian ones.

I have been unsuccessful in changing the 
compiler to emit little endian coff files.
In m68k.h I now have a the line
"#define BYTES_BIG_ENDIAN 0" instead of the
default value of 1.  That didn't help.
I have been trying to find the code where 
the values are written to the output file
so I could insert macros to change the 
endianess of the values.  I haven't been able
to do that either.

What I am asking for is a reasonable approach
that would allow me to change the m68k-coff
output from big endian to little endian.

Thanks,
Jeff


--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.


More information about the Gcc mailing list