Re: [uCsimm] relocation truncated to fit: DISP16 printf

From: Bobby_Lai@acer.com.tw
Date: Thu Mar 23 2000 - 09:01:25 EST


First : I have use "-fPIC" as a part of CFLAGS of m68k-pic-coff-gcc.
When I use "m68k-pic-coff-ld" to link all my objects code that my program
need it,
loader complain me with "relocation truncated ..... ".

Second: I have wrote a program larger than 37k bytes execution code.
   It seems "bsr xxx" can not jump over 32767 bytes distance ....

I log a portion of loader message to you.
Thank you in advance.

m68k-pic-coff-ld --embedded-relocs -T ../arch/embed/user.ld
../arch/embed/crt0.o addrtest.stamp.embed.o ../version/stamp.embed.o
addrtest.embed.o ../build/embed/mwinlib.a ../../uC-libc/libc.a
/usr/local/gnu/lib/gcc-lib/m68k-pic-coff/2.7.2.2-pic-010298/libgcc.a -o
../build/embed/addrtest.coff && cp -f ../build/embed/addrtest.coff
../build/embed/addrtest.coff.bak && ../../coff2flt-0.3/coff2flt -o
../build/embed/addrtest ../build/embed/addrtest.coff
../arch/embed/crt0.o(.text+0x16):../arch/embed/crt0.S: relocation truncated
 to fit: DISP16 exit
../build/embed/mwinlib.a(winmain.embed.)(.text+0x16):winmain.c: relocation
truncated to fit: DISP16 exit
../build/embed/mwinlib.a(winmain.embed.)(.text+0x58):winmain.c: relocation
truncated to fit: DISP16 exit
../build/embed/mwinlib.a(winmain.embed.)(.text+0x32e):winmain.c: relocation
 truncated to fit: DISP16 memset
../build/embed/mwinlib.a(winmain.embed.)(.text+0x33c):winmain.c: relocation
 truncated to fit: DISP16 memset
../build/embed/mwinlib.a(winmain.embed.)(.text+0x34a):winmain.c: relocation
 truncated to fit: DISP16 memset
../build/embed/mwinlib.a(winmain.embed.)(.text+0x472):winmain.c: relocation
 truncated to fit: DISP16 select
make[2]: *** [../build/embed/addrtest] Error 1
make[2]: Leaving directory `/home/mp100/pilot/addrtest'
make[1]: *** [../build/embed/addrtest] Error 2
make[1]: Leaving directory `/home/mp100/pilot/romdisk'
make: *** [romdisk/romdisk.s19] Error 2

Erwin Authried <eauth@softsys.co.at> on 2000/03/23 11:04:05 AM
                                                              
                                                              
                                                              
 To: "'ucsimm@uClinux.com'" <ucsimm@uClinux.com>
                                                              
 cc: Bobby Lai/AI/ACER
                                                              
                                                              
                                                              
 Subject: Re: [uCsimm] relocation truncated to fit: DISP16
          printf
                                                              

Hi Bobby,

Have you compiled your application with -fPIC ??
what exactly are the linker error messages that you get?
_cleanup in crt0.s will make problems. Remove the dummy function
from this file, and add an empty function declaration _cleanup()}{} as
your last object module. As far as I know, there's no shared lib support
for uClinux (yet).

Regards,

Erwin

> Hi Erwin.
>
> My platform is Motorola 68EZ328.
>
> I have got your 32bits-pic patch for gcc-2.7.2.3 and build a new cross
> compilter.
> But, when I use m68k-pic-coff-ld ... it seems not work.
> ld truncate to fit DISP16, also.
>
> Does some extra steps I missed ??
>
> Is it possible that build shared libraries on uClinux for 68EZ328 ?
>
> Thank you !!
>
>
>
>
>
> >Hi Bobby!
> >
> >Try my gcc patches at http://www.home.at/uclinux.
> >
> >Regards
> >
> >Erwin
>

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:35 EST