embedded MIPS multilib selection or isa level setting error
Ian Lance Taylor
ian@zembu.com
Mon Apr 17 09:53:00 GMT 2000
Date: Mon, 17 Apr 2000 08:20:15 -0500
From: Joel Sherrill <joel.sherrill@OARcorp.com>
bash-2.03$ mips64orion-rtems-gcc -mcpu=4600 main.c -lc
/opt/rtems/mips64orion-rtems/bin/ld: warning:
cannot find entry symbol _start; defaulting to 0000000000400000
But when you change the cpu option to -mcpu=4650 or -m4650, this
gives an ISA mismatch on the ld.
bash-2.03$ mips64orion-rtems-gcc -mcpu=4650 main.c -lc
/opt/rtems/mips64orion-rtems/bin/ld: /tmp/ccqIhepE.o:
ISA mismatch (-mips3) with previous modules (-mips1)
Bad value: failed to merge target specific data of file /tmp/ccqIhepE.o
/opt/rtems/mips64orion-rtems/bin/ld: warning:
cannot find entry symbol _start; defaulting to 0000000000400000
collect2: ld returned 1 exit status
I take this to mean that main.c->main.o is somehow compiled for
ISA level 1 and is being linked against an ISA level 3 library.
It's the other way around. main.c was compiled -mips3, but some
previous object file was compiled -mips1. Since you are getting the
error when the linker sees main.c, and the linker will normally see
that before any library, this most likely indicates that some startup
file is compiled -mips1.
But to make matters worse, specifying -m4650 and -mcpu=4650 do
not result in the same multilib variant being selected.
-m4650 selects "single"
-mcpu=4650 selects "default"
Without knowing the expected behavior here, all I can do is say that
something is wrong with the current behavior. :)
This is documented. The -mcpu option affects only scheduling, not
code generation.
Ian
More information about the Binutils
mailing list