This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: How to set big-endian for ARM target?
- To: Grant Edwards <grante at visi dot com>
- Subject: Re: [ECOS] How to set big-endian for ARM target?
- From: Jesper Skov <jskov at cygnus dot co dot uk>
- Date: 29 Oct 1999 16:41:55 +0200
- Cc: ecos <ecos-discuss at sourceware dot cygnus dot com>
- References: <19991028164607.A9745@visi.com>
>>>>> "Grant" == Grant Edwards <grante@visi.com> writes:
Grant> I've got big-endian hardware with a little-endian eCOS, and it
Grant> doesn't work too well. :)
Grant> I've found that adding -mbig-endian to ARCHFLAGS in
Grant> pkgconf/makevars takes care of the compiling/assembling, but ld
Grant> is unhappy because it thinks the target is little-endian and
Grant> it's being given big-endian files:
Grant> arm-elf-ld --whole-archive
Grant> /home/grante/ecos/ecos-1.2.1/packages/ecos-arm7/install/lib/libextras.a
Grant> -r -o
Grant> /home/grante/ecos/ecos-1.2.1/packages/ecos-arm7/install/lib/extras.o
Grant> arm-elf-ld: hal_dummy.o: compiled for a big endian system and
Grant> target is little endian File in wrong format: failed to merge
Grant> target specific data of file
Grant> /home/grante/ecos/ecos-1.2.1/packages/ecos-arm7/install/lib/libextras.a(hal_dummy.o)
Grant> [...]
Grant> I've added -EB to LDARCHFLAGS in makevars, but that doesn't
Grant> seem to be used in the build step above. Was there a configure
Grant> script option I missed that specifies the target endianness?
Try adding this to the arm.ld linker script:
#if defined(__ARMEB__)
OUTPUT_FORMAT(elf32-bigarm)
#endif
May do the trick.
Jesper