Cannot find entry symbol _start
Feng Wang
fengwang.emb at gmail.com
Fri Jun 8 10:00:39 UTC 2007
Hi, all
I'm a newbie to rtems and want to build toolset for sparc target from
source codes. As rtems 4.6.5 on-line documents say, I download souce
codes, patch diff files, configure, make and install. All are
successful. But when I used the installed compiler, got a warning
"cannot find entry symbol _start" and link error "undefined reference
to `_exit'"
Do I miss something?
My host platform is Red Hat Linux release 9 (Shrike) Kernel 2.4.20-8
on an i686. Host compiler is gcc version 3.2.2 20030222 (Red Hat Linux
3.2.2-5)
I installed the toolset to /opt/rtems-4.6. An example is followed.
Any help will be appreciated. TIA.
[wf at WFPC wf]$ cat a.c
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
printf("Hello world\n");
exit (0);
return 0;
}
[wf at WFPC wf]$ /opt/rtems-4.6/bin/sparc-rtems-gcc a.c
/opt/rtems-4.6/lib/gcc-lib/sparc-rtems/3.2.3/../../../../sparc-rtems/bin/ld:
warning: cannot find entry symbol _start; defaulting to 00010074
/opt/rtems-4.6/lib/gcc-lib/sparc-rtems/3.2.3/../../../../sparc-rtems/lib/libc.a(exit.o):
In function `exit':
/home/wf/rtems/b-gcc/sparc-rtems/newlib/libc/stdlib/../../../../../gcc-3.2.3/newlib/libc/stdlib/exit.c:80:
undefined reference to `_exit'
collect2: ld returned 1 exit status
[wf at WFPC wf]$ /opt/rtems-4.6/bin/sparc-rtems-gcc -v
Reading specs from /opt/rtems-4.6/lib/gcc-lib/sparc-rtems/3.2.3/specs
Configured with: ../gcc-3.2.3/configure --build=i686-pc-linux-gnu
--host=i686-pc-linux-gnu --target=sparc-rtems --with-gnu-as
--with-gnu-ld --with-newlib --verbose --with-system-zlib --disable-nls
--enable-version-specific-runtime-libs --enable-threads=rtems
--prefix=/opt/rtems-4.6 --enable-languages=c
Thread model: rtems
gcc version 3.2.3
Best Regards,
Feng Wang
More information about the users
mailing list