pc386 - hello world linker problem

Lars Munch lars at segv.dk
Mon Nov 8 22:36:11 UTC 2004


Hello

I have been playing a bit with bochs and added a small contribution
about creating FAT32 hard disk images for bochs to the wiki. Now its
time to actually build "hello world" for pc386 myself to run in bochs,
but due to a linker error I have not had any success on this part yet.

I am using:
binutils-2.13.2.1-rtems-20030901.diff
binutils-2.13.2.1.tar.bz2
gcc-3.2.3-rtems-20040420.diff
gcc-3.2.3.tar.bz2
newlib-1.11.0-rtems-20031113.diff
newlib-1.11.0.tar.gz

Binutils is configured with:
# configure --target=i386-rtems --prefix=/opt/rtems/i386-rtems

Gcc is configured with:
# configure --target=i386-rtems --prefix=/opt/rtems/i386-rtems \
  --with-gnu-as --with-gnu-ld --with-newlib --verbose --enable-threads \
  --enable-languages="c,c++"

RTEMS from cvs HEAD is configured with:
# configure --target=i386-rtems --enable-rtemsbsp=pc386 \
  --prefix=/opt/rtems/i386-rtems --disable-cxx --disable-itron \
  --enable-posix --disable-tests

Now building examples/hello_world_c gives the following:

test -d o-optimize || mkdir o-optimize
i386-rtems-gcc --pipe -B/opt/rtems/i386-rtems/i386-rtems/pc386/lib/
-specs bsp_specs -qrtems   -g -Wall  -O4 -g         -c   -o
o-optimize/test.o test.c
In file included from test.c:31:
/opt/rtems/i386-rtems/i386-rtems/pc386/lib/include/confdefs.h:4:2:
warning: #warning <confdefs.h> is deprecated, use <rtems/confdefs.h>
instead
i386-rtems-gcc --pipe -B/opt/rtems/i386-rtems/i386-rtems/pc386/lib/
-specs bsp_specs -qrtems   -g -Wall  -O4 -g
-Wl,-Ttext,0x00100000 -o o-optimize/hello.obj  o-optimize/test.o
/opt/rtems/i386-rtems/i386-rtems/pc386/lib/no-dpmem.rel
/opt/rtems/i386-rtems/i386-rtems/pc386/lib/no-event.rel
/opt/rtems/i386-rtems/i386-rtems/pc386/lib/no-msg.rel
/opt/rtems/i386-rtems/i386-rtems/pc386/lib/no-mp.rel
/opt/rtems/i386-rtems/i386-rtems/pc386/lib/no-part.rel
/opt/rtems/i386-rtems/i386-rtems/pc386/lib/no-signal.rel
/opt/rtems/i386-rtems/i386-rtems/pc386/lib/no-timer.rel
/opt/rtems/i386-rtems/i386-rtems/pc386/lib/no-rtmon.rel     
/opt/rtems/i386-rtems/lib/gcc-lib/i386-rtems/3.2.3/../../../../i386-rtems/bin/ld:
cannot open linker script file c: No such file or directory
collect2: ld returned 1 exit status
make: *** [o-optimize/hello.exe] Error 1

This is my first time using RTEMS for i386, so any pointer are highly
appreciated.

Thanks
Lars Munch




More information about the users mailing list