[uClinux-dev] C++, IOStreams, relocation truncated to fit

Ken Treis ktreis at keyww.com
Tue Nov 20 18:11:42 EST 2001


Hello all,

I've been hesitant to ask this because it's probably a FAQ, but I can't 
seem to find the answer anywhere.  If it's a RTFM, please point me at 
the Fine Materials.  :)

We've succeeded in compiling a C++ app for uClinux, and it worked fine 
until we started using IOStreams.  Now we get compilation errors that 
are reminescent of the old coff compiler problems with "relocation 
truncated to fit".  However, all info that I've found about this 
particular problem seems to suggest that the ELF toolchain will fix the 
problem.  I'm using the latest m68k-elf tools (20010716), so I don't 
feel that I can rightly blame the compiler. Perhaps it's something that 
I'm doing wrong with the CFLAGS, or perhaps IOStreams just don't work 
quite right under uClinux.

Here's the output, and any insights are greatly appreciated.  TIA.

m68k-elf-g++ -Os -g -fomit-frame-pointer  -Dlinux -D__linux__ -Dunix 
-D__uClinux__ -DEMBED -I~/coldfire/uClinux/lib//include 
-I~/coldfire/uClinux/lib/libm -I~/coldfire/uClinux -fno-builtin 
-msep-data -I~/coldfire/uClinux//include  -fname-mangling-version-0 
-ansi -I../../CppTestKit -g -Wall -fPIC -m5307 -D__uClinux__ 
-Wl,-elf2flt DataDestination.o FrameBuffer.o Image.o ImageSource.o 
Normalizer.o Pixel.o RealNormalizer.o SimulatedNormalizer.o 
AssertImagesEqual.o NormalizerTest.o -L. -o test 
../../CppTestKit/coldfire/DumbConsole.o 
../../CppTestKit/coldfire/libTkCore.a -lc -lgcc
test.elf2flt: In function `_IO_fclose':
/home/davidm/work/m68k-elf-tools/m68k-elf-gcc/m68k-elf/m5307/msep-data/libio/../../../../../gcc-2.95.3/libio/iofclose.c:54: 
relocation truncated to fit: R_68K_PC16 __cmpdf2
/home/davidm/work/m68k-elf-tools/m68k-elf-gcc/m68k-elf/m5307/msep-data/libio/../../../../../gcc-2.95.3/libio/iofclose.c:54: 
relocation truncated to fit: R_68K_PC16 __cmpdf2
/home/davidm/work/m68k-elf-tools/m68k-elf-gcc/m68k-elf/m5307/msep-data/libio/../../../../../gcc-2.95.3/libio/iofclose.c:54: 
relocation truncated to fit: R_68K_PC16 __cmpdf2
test.elf2flt: In function `__muldi3':
/home/davidm/work/m68k-elf-tools/m68k-elf-gcc/gcc/../../gcc-2.95.3/gcc/libgcc2.c(.text+0x150e2): 
relocation truncated to fit: R_68K_PC16 __cmpdf2
collect2: ld returned 1 exit status
make: *** [test] Error 1

-- 
Ken Treis / Software Engineer
Key Technology, Inc.
ktreis at keyww.com
----
America will not reject abortion until America sees abortion.
http://www.priestsforlife.org/resources/abortionimages/index.htm


This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list