When I compile klibc on little-endian mips, I get: KLIBCLD klibc/libc.so ld: klibc/arch/mips/crt0.o: compiled for a little endian system and target is big endian ld: klibc/arch/mips/crt0.o: endianness incompatible with that of the selected emulation ld: failed to merge target specific data of file klibc/arch/mips/crt0.o When I change "elf32-tradbigmips" to "elf32-tradlittlemips" in the linker script (OUTPUT_FORMAT) it works. Unfortunately, I don't know what the right fix is. -- Martin Michlmayr http://www.cyrius.com/
Martin Michlmayr
2006-Jan-16 17:08 UTC
[klibc] Re: [mips] doesn't compile on little-endian
Fix klibc compilation on little-endian mips> When I compile klibc on little-endian mips, I get: > KLIBCLD klibc/libc.so > ld: klibc/arch/mips/crt0.o: compiled for a little endian system and target is big endian > ld: klibc/arch/mips/crt0.o: endianness incompatible with that of the selected emulation > ld: failed to merge target specific data of file klibc/arch/mips/crt0.oSigned-off-by: Martin Michlmayr <tbm@cyrius.com> --- diff -urN klibc-1.1.16~/klibc/arch/mips/klibc.ld klibc-1.1.16/klibc/arch/mips/klibc.ld --- klibc-1.1.16~/klibc/arch/mips/klibc.ld 2006-01-06 06:11:43.000000000 +0000 +++ klibc-1.1.16/klibc/arch/mips/klibc.ld 2006-01-17 01:01:12.000000000 +0000 @@ -1,9 +1,6 @@ /* Linker script for klibc.so, needed because of the the damned GNU ld script headers problem */ -OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", - "elf32-tradlittlemips") -OUTPUT_ARCH(mips) ENTRY(__start) SECTIONS { -- Martin Michlmayr http://www.cyrius.com/