This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]