Is this ABI issue or ISA issue which binutils is not suported?

17 views
Skip to first unread message

hucheng

unread,
Dec 11, 2009, 10:04:28 AM12/11/09
to archlinux-for-loongson
Hi:

I have tried to build natively open64 compiler on Loongson-2E
netbook. And I can build the correct *.s assembly code, However,
linker ld pre-installed on Loongson-2e machine cannot link it. I guess
the assembler AS is also not compatible. For example:

[zhc@loongson tmp]$ cat hello.c
#include <stdio.h>

int main()
{
printf("hello, world!\n");
return 0;
}
/home/zhc/open64/lib/gcc-lib/loongson-open64-linux/4.2/as -mabi=n32 -
EL -g0 -march=loongson2e hello.s -o hello.o
/usr/bin/gcc -mabi=n32 -L/home/zhc/open64//lib/gcc-lib/loongson-open64-
linux/4.2/32 -Wl,-rpath-link,/home/zhc/open64//lib/gcc-lib/loongson-
open64-linux/4.2/32 hello.o
/usr/local/bin/ld: hello.o: ABI is incompatible with that of the
selected emulation
/usr/local/bin/ld: failed to merge target specific data of file
hello.o
/usr/local/bin/ld: BFD (GNU Binutils) 2.20.51.20091210 assertion fail
elfxx-mips.c:3134
collect2: ld returned 1 exit status

[zhc@loongson tmp]$ file hello.o
hello.o: ELF 32-bit LSB relocatable, MIPS, N32 MIPS-III version 1
(SYSV), not stripped

[zhc@loongson tmp]$ file /usr/local/bin/ld
/usr/local/bin/ld: ELF 32-bit LSB executable, MIPS, MIPS-I version 1
(SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs),
for GNU/Linux 2.6.9, not stripped


The AS and LD is built by myself natively on Loongson-2E, from
latest binutils trunk. I doubt it is the binutils issue, did the patch
posted in this group fix the issue? Or someone can give light on it?
Thanks.

Reply all
Reply to author
Forward
0 new messages