This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: How retarget GAS to a machine with big endian text section and little endian data section?
- From: Nick Clifton <nickc at redhat dot com>
- To: jzhang918 at hotmail dot com
- Cc: binutils at sources dot redhat dot com
- Date: 23 Dec 2002 16:01:08 +0000
- Subject: Re: How retarget GAS to a machine with big endian text section and little endian data section?
- References: <DAV47zyfyz5b6KZmcK8000144db@hotmail.com>
Hi Jie,
> 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.
> Is there some other machines with text section and data section in
> different endianess?
I do not know of any.
Cheers
Nick