[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rtems-gcc linker warnings



Ralf Corsepius wrote:
> 
> Hi,
> 
> With some-rtems toolschains, freshly build from binutils-2.9.1.0.25,
> newlib-1.8.1 and egcs-1.1.2, all with latest rtems-patches applied, I
> get linker warnings when linking an empty main function:
> 
> #cat hello.c
> int main( )
> {
>   return 1;
> }
> 
> #i386-rtems-gcc -Wall -o hello hello.c
> /opt/rtems/i386-rtems/bin/ld: warning: cannot find entry symbol _start;
> defaulting to 08048084
> #hppa1.1-rtems-gcc -Wall -o hello hello.c
> /opt/rtems/hppa1.1-rtems/bin/ld: warning: cannot find entry symbol
> $START$; defaulting to 00002000
> #sparc-rtems-gcc -Wall -o hello hello.c
> /opt/rtems/sparc-rtems/bin/ld: warning: cannot find entry symbol _start;
> defaulting to 00010090
> #mips64orion-rtems-gcc -Wall -o hello hello.c
> /opt/rtems/mips64orion-rtems/bin/ld: warning: cannot find entry symbol
> _start; defaulting to 0000000000400020
> 
> #sh-rtems-gcc -Wall -o hello hello.c
> #m68k-rtems-gcc -Wall -o hello hello.c
> #i960-rtems-gcc -Wall -o hello hello.c
> 
> Note: This happens without having rtems installed and therefore also
> happens silently during the configuration of  RTEMS when bootrapping
> RTEMS (cf. rtems/config.log) and can potentially affect configure script
> checks (Though I did not notice any, yet).
> 
> AFAIS all compilers not showing this problem are COFF, while all other
> seem to be ELF. Therefore I guess that this might be related to the
> switch to elf (newlib + crt0 ?).
> 
> Ralf.

I can't speak for the targets you tried. But I just submitted to OAR
patches to support ELF output for the m68k. I had to explicitly #define
STARTFILE_SPEC crt0.o to get configure to work, where crt0.o is the
RTEMS dummy startup file that allows configure to work when configuring
RTEMS. If I just picked up the default m68k-elf configuration, the start
file defaulted to "". I would not be surprised if the other targets had
similar problems.


-- 
Charles-Antoine Gauthier
Research Officer
Software Engineering Group
Institute for Information Technology
National Research Council of Canada
Ottawa, ON, Canada
K1A 0R6