Cannot find entry symbol _start

Aleix Conchillo Flaqué aconchillo at ieec.cat
Fri Jun 8 10:15:22 UTC 2007


Hi,

if you want to generate a raw application (without RTEMS) I explained  
it a while ago, you can find the whole thread here:

http://www.rtems.com/ml/rtems-users/2006/january/msg00007.html

If you want to build an RTEMS based application, the best way is to  
use the Makefiles provided by RTEMS and to have a look at some RTEMS  
examples.

Best regards,

Aleix

On 08 Jun 2007, at 12:00, Feng Wang wrote:

> 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
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users




More information about the users mailing list