This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: arm big endian broken?
- From: Nick Clifton <nickc at redhat dot com>
- To: Josh Fryman <fryman at cc dot gatech dot edu>
- Cc: binutils at sources dot redhat dot com
- Date: 13 Mar 2003 17:08:42 +0000
- Subject: Re: arm big endian broken?
- References: <20030306142927.5532c103.fryman@cc.gatech.edu>
Hi Josh,
> i'm trying to build a cross-hosting toolchain for armv5b (big endian
> arm v5) on an i686 host. it appears that binutils is broken in some
> manner such that "ld" won't link together big-endian objects. this
> shows up for the first time in build glibc.
>
> if i re-run the command from gcc with -mbig-endian, it works fine.
> it seems like the binutils are built for arm little-endian, not big-
> endian. this is a bug as far as i can see.
>
> anyone have suggestions or advice?
Well it is true that the binutils tools do not parse a configuration
target of "armv5b" as being a big-endian target, but normally this
should not matter. Normally gcc will tell the linker to default to a
big-endian output by adding the -EB command line switch.
My guess would be that the specs file created for gcc are not passing
the -EB switch on to the linker. You could have a look at the file to
confirm this, and assuming that it is missing, add it back in.
The proper fix of course would be to find out why it is not in the
specs file in the first place, but that looks more complicated. From
a quick scan of the gcc sources I could not find where it actually
works out that "armv5b" is a big endian toolchain in the first place,
so I am not sure how/where the specs file should be modified.
Cheers
Nick