bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mips cross compiler generates illegal object format


From: Ronald Fischer
Subject: Mips cross compiler generates illegal object format
Date: Thu, 17 May 2001 14:31:10 +0200

I installed a cross compiler, intended to run under Solaris 2.6 and
generating code for a SVR4.2 maschine using a R4000 mips processor. As a
first step, I used the cross compiler to
compile a source file on the Sparc and copied the object file to the
Mips machine, where I had a native gcc and the local ld (not Gnu-ld)
installed. The intention of this step was to verify the correctness of
the object file which the cross compiler produces.

I performed this with a C program, hel.c, and a C++ program, hello.cc.
On the MIPS side, this resulted in the following error messages:

cc -o hel hel.o
ld: hel.o: warning: unknown section type 0x4 ignored section
".rela.text"
ld: hel.o: warning: non_global symbol `gcc2_compiled.` found in global
section of symbol table
ld: hel.o: warning: non_global symbol `__gnu_compiled_c` found in global
section of symbol table
ld: hel.o: fatal error: Ran out of memory for mfi tables

collect2: ld returned 1 exit status


and


g++ -o hello hello.o
ld: hello.o: fatal error: hello.o: wrong machine type
collect2: ld returned 1 exit status


This seems to indicate that the object file produced by the compiler is
indeed incorrect.

Here are the configuration I used for building the cross compiler:

binutils-2.10.1/configure --target=mips-elf --prefix=$HOME/sw/gnu/cross
-v
gcc-2.95/configure --target=mips-elf --prefix=$HOME/sw/gnu/cross
--with-gnu-ld --with-gnu-as  --with-newlib
--with-headers=../newlib-1.9.0/newlib/libc/include/
--enable-languages=c++ -v
newlib-1.9.0/configure --target=mips-elf --prefix=$HOME/sw/gnu/cross -v

Ronald Fischer
-- 
Ronald Otto Valentin Fischer <address@hidden>
http://profiles.yahoo.com/ronny_fischer/
http://fusshuhn.ourfamily.com/cppincomp.html
This is Unix land. In quiet nights you can hear Windows machines reboot.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]