gcc -mips2 support on indy
I'm just installed Debian 3.0 on my Indy R4600 and am having a problem
with -mips2:
indy-01$ cc test.c -mips2
indy-01$ ./a.out
bash: ./a.out: No such file or directory
indy-01$ objdump -f a.out
a.out: file format elf32-tradbigmips
architecture: mips:6000, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x004004d0
indy-01$ cc test.c
indy-01$ ./a.out
hello
indy-01$ objdump -f a.out
a.out: file format elf32-tradbigmips
architecture: mips:3000, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x004004d0
It appears that the Indy ld refuses to load R6000 (mips II) architecture
modules. However, I don't have this problem with Debian 3.0 on my Cobalt
Qube 2. I can compile and run using -mips2.
The reason I'm using -mips2 is because there is a bug in gcc that causes
it to fail to compile a very large (>32k) function I have. It produces
forward branches to targets that are out of range. Using -mips2 fixes
this problem.
On a related note, how come -mips3 objects can't be linked against the
-mips1 libraries:
indy-01$ cc test.c -mips3
/usr/bin/ld: /tmp/ccyFDthq.o: ISA mismatch (-mips3) with previous
modules (-mips1)
Bad value: failed to merge target specific data of file /tmp/ccyFDthq.o
collect2: ld returned 1 exit status
I found an SGI Indy FAQ that says for IRIX -mips3 implies n32 calling
conventions. I'm not sure if this is also true with Debian Linux, so I
tried explicitly compiling with -o32, but that didn't help any.
Chris
Reply to: