This is the mail archive of the gcc@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]

Linker error - missing _start



Can anyone help me with this?


> 
> We may have a slight problem (I compiled as target=powerpc-motorola-elf host=i686-pc-cygwin build=i686-pc-cygwin).
> The library is newlib.
> 
> When running a hello.c test I am getting a linker error.  Can anyone help?
> 
> Thanks in advance
> 
> ------------------------------------- log ------------------------------------
> ssmith@AZ75-SSMITH ~
> $ ls
> hello.c
> 
> ssmith@AZ75-SSMITH ~
> $ cat hello.c
>   #include <stdio.h>
>   int
>   main()
>   {
>     printf("hello world\n");
>     return 0;
>   }
> 
> ssmith@AZ75-SSMITH ~
> $
> 
> ssmith@AZ75-SSMITH ~
> $ target=powerpc-motorola-elf
> 
> ssmith@AZ75-SSMITH ~
> $ $target-gcc hello.c
> /usr/local/lib/gcc-lib/powerpc-motorola-elf/2.95.2-6/../../../../powerpc-motorola-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 01800074
> /cygdrive/c/DOCUME~1/ssmith/LOCALS~1/Temp/ccF4RY4I.o: In function `main':
> /cygdrive/c/DOCUME~1/ssmith/LOCALS~1/Temp/ccF4RY4I.o(.text+0x20): undefined reference to `printf'
> collect2: ld returned 1 exit status
> 
> ssmith@AZ75-SSMITH ~
> $ ls
> hello.c
> 
> $

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