This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
embedded MIPS multilib selection or isa level setting error
- To: gcc-bugs at gcc dot gnu dot org, binutils at sourceware dot cygnus dot com
- Subject: embedded MIPS multilib selection or isa level setting error
- From: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Date: Mon, 17 Apr 2000 08:20:15 -0500
- Organization: OAR Corporation
- Reply-To: joel dot sherrill at OARcorp dot com
GCC Version: gcc 2.95.2
BINUTILS Version: binutils-2.9.5.0.24
Target: mips64orion-rtems (essentially mips64orion-elf)
I think I have found a problem in the way gcc is either (1)
setting the isa level in objects or (2) selecting the
appropriate multilib variant when the flag -m4650 is selected.
I cc'ed the binutils list since the error message is actually
produced by ld and this may indicate some interfacing error between
gcc and as.
The simple test case is this file named main.c:
int main(int argc, char **argv)
{
strlen( "invoke something in libc" );
}
strlen() is referenced simply to ensure that we have to get something
from libc. When compiled for the 4600, you get this:
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.
Using -Wl,-t I see that it is linking against the "single" library
variant which I think is correct so I think this is an error in
gcc setting the ISA level when -m4650 is specified.
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. :)
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985