This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fail to compile file with profile for mips system using cross-compiling


Hi all,
   I have met the following issue when compile application with mips system. The test .c file is 

#include <stdio.h>

int main(int argc, char **argv){
    int i = 5;
    int j = 0;

    printf("\nHello World!, i is %x, j is %x\n", i, j);
}
...

The steps to reproduce the error:
1.mips_lexra_fp_be-gcc -c -pg -g test.c
2.mips_lexra_fp_be-gcc -pg -o test test.o

Then get the following error messages:
######
/projects/mips/lexra_fp_be/bin/../target/usr/lib/gcrt1.o: In function `__gmon_start__':
gmon-start.c(.text+0xb8): undefined reference to `_start'
collect2: ld returned 1 exit status
#######

I googled such issue and find many guys face the same problem but less answers are found or the solutions cannot work. Also, I have tried to add "-static" option , just as some guys mentioned else where but still failed.

What I should point out is that such compiling can work on x86 system. And failed on a mips-cross-compiling system. 

The configuration of my pc is : mips-cross-compiling tool chain, mips-gcc 2.95.3, mips-ld 2.10.91.  The kernel is 2.6.9-1.667, Fedora 3.

Any ideas on this issue?

Thanx.

Aaron
?
?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]