How retarget GAS to a machine with big endian text section and little endian data section?

Jie Zhang jzhang918@hotmail.com
Tue Jan 21 01:52:00 GMT 2003


From: "Nick Clifton" <nickc@redhat.com>
To: <jzhang918@hotmail.com>


> 
> > I want to retarget GAS to a machine, using BFD version and ELF
> > format. Its text section is big endian but its data section is
> > little endian. What should I define TARGET_BYTES_BIG_ENDIAN, 1 or 0?
> 
> I am not sure of GAS and BFD will support such an architecture.
> 
> I  would suggest setting TARGET_BYTES_BIG_ENDIAN to 1 so that the
> contents of the text sections are created correctly.  You can then
> #define md_number_to_chars so that it behaves differently depending
> upon whether 'now_seg' is a data section or not.  It *might* work.
> 
Yes, it works! Thanks a lot!

Jie



More information about the Binutils mailing list