[ECOS] How to set big-endian for ARM target?

Jesper Skov jskov@cygnus.co.uk
Fri Oct 29 07:42:00 GMT 1999


>>>>> "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


More information about the Ecos-discuss mailing list