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: "Jie Zhang" <jzhang918 at hotmail dot com>
- To: "Nick Clifton" <nickc at redhat dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Tue, 21 Jan 2003 09:52:33 +0800
- Subject: Re: How retarget GAS to a machine with big endian text section and little endian data section?
- References: <DAV47zyfyz5b6KZmcK8000144db@hotmail.com> <m31y48wwqj.fsf@north-pole.nickc.cambridge.redhat.com>
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