From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Skov To: Grant Edwards Cc: ecos Subject: Re: [ECOS] How to set big-endian for ARM target? Date: Fri, 29 Oct 1999 07:42:00 -0000 Message-id: References: <19991028164607.A9745@visi.com> X-SW-Source: 1999-10/msg00120.html >>>>> "Grant" == Grant Edwards 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