This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
About mips-elf-ld (newlib)
- From: libra <mr924352 at cs dot nthu dot edu dot tw>
- To: binutils at sources dot redhat dot com
- Date: Wed, 7 Jul 2004 10:38:31 +0800
- Subject: About mips-elf-ld (newlib)
Hello,all:
I build the GNU toolchain for mips (--target=mips-elf)
Now, i have built the binutils, gcc, newlib.
After building, i try to write a simple C porgram (see below) to test my tools
(mips-elf-gcc)
I encounter some problems.
The error message is that:
/tools/mips/H-i686-pc-cygwin/lib/gcc/mips-elf/3.5.0/../../../../mips-
elf/bin/ld: warning: cannot find entry symbol _start; defaulting to
0000000000400040
/cygdrive/c/DOCUME~1/libra/LOCALS~1/Temp/ccYfspyO.o(.text+0x3c): In function
`main':
: undefined reference to `printf'
collect2: ld returned 1 exit status
I try to find out what's going wrong.
I find that it lacks something to produce these errors.
crt0.o ==> warning: cannot find entry symbol _start; defaulting to
0000000000400040
-lc ==>undefined reference to `printf
When add these two option, the other error message appear.
Anyone have ideas to solve this problem.
Maybe, this is a bug in newlib,or anyone call tell me where i can find the
maillist for newlib.
C program:
#include <stdio.h>
int main()
{
int a=1,b=2;
printf("the result is %d\n",a+b);
return 0;
}