When you compile a t.c file with MIPS64EL-UNKNOWN-LINUX-GNU-GCC,
The contents of t.c are as follows:
#include <stdio.h>
int main ()
{
return 0;
}
Mybox ~ # mips64el-unknown-linux-gnu-gcc-c T.C
Mybox ~ # Mips64el-unknown-linux-gnu-ld-o-M ELF64LTSMIP t T.O
Mips64el-unknown-linux-gnu-ld:cannot find elf64ltsmip:no such file or directory
t.o:in function ' main ':
T.C: (. text+0x0): Multiple definition of ' main '
T: (. text+0x0): defined here
You can solve this problem in the following ways:
Mips64el-unknown-linux-gnu-gcc-mabi=64-c t.c
Mips64el-unknown-linux-gnu-ld-m Elf64ltsmip-o T T.O
Use the following command to see what kinds of emulations the machine supports:
Mybox ~ # Mips64el-unknown-linux-gnu-ld-o-mabi=64 t T.O
mips64el-unknown-linux-gnu-ld:unrecognised emulation mode:abi=64
Supported Emulations:elf32ltsmipn32 elf32btsmipn32 ELF32LTSMIP ELF32BTSMIP ELF64LTSMIP