On 2007-12-21, Geetha Arasu <[EMAIL PROTECTED]> wrote:
>
> I got the error "relocation truncated to fit "  . so i removed the
> redundancy codes and reduced the code segment size as one of them suggested
> me.....
> but now i found no more errors in any of my files or functions.... happy
> about it.....
>  Though there is no error found in my files.It explicitly shows 20 errors
> during the compilation..that too errors in functions
> `__do_bhook',`_GccRelocateData',`__do_ehook'`__do_ctors'- no idea of what
> these functions are.........
> May i know What are these functions? 
> Is it a problem with the compiler or with its internal functions?
>
> The  compilation errors are
>
> In function `__do_bhook':: relocation truncated to fit: DISP16        
> relocation
> truncated to fit: DISP16 start[hooks.c]
>             
> In  function `_GccRelocateData':: relocation truncated to fit relocation
> truncated to fit: DISP16 start[dreloc.c]                              
> In function `__do_ehook':: relocation truncated to fit: DISP16        
> relocation
> truncated to fit: DISP16 start[hooks.c]
>                       
> In function `__do_ctors':: relocation truncated to fit: DISP16 
>       relocation truncated to fit: DISP16 start[hooks.c]      
>       
> In function `start':: relocation truncated to fit: DISP16 _GccRelocateData
> relocation truncated to fit: DISP16 __do_bhook                relocation 
> truncated
> to fit: DISP16 __do_bhook[/usr/m68k-palmos/lib/crt0.o(.text+0x50):crt0.c]
> camera                                relocation truncated to fit: DISP16
> __do_ctors    camera                  relocation truncated to fit: DISP16
> __do_ctors[/usr/m68k-palmos/lib/crt0.o(.text+0x5a):crt0.c]    camera
> relocation truncated to fit: DISP16 __do_dtors        camera
> relocation truncated to fit: DISP16
> __do_dtors[/usr/m68k-palmos/lib/crt0.o(.text+0x70):crt0.c]    camera
> relocation truncated to fit: DISP16 __do_ehook        camera
> relocation truncated to fit: DISP16
> __do_ehook[/usr/m68k-palmos/lib/crt0.o(.text+0x7a):crt0.c]    camera
>
>       In function `__do_dtors':: relocation truncated to fit: DISP16 
>       relocation truncated to fit: DISP16 start[hooks]
>
>
> Any suggestions?..................
>

Your main code section (the .text section) is still too big.
These (do_bhook, GCCRelocateData, etc.) are runtime library routines 
called by the startup code. They get placed by the linker at the end of 
the main code section (after your own object files) but get called by the 
startup code at the beginning of the code section. The distance is still 
larger than 32K (max distance for 16 bit relocation), hence the 
'relocation truncated to fit' messages.
You still need to reduce the main section more to get rid of this.
See the prc-tools/gcc documentation for more details.
Producing a link map will give you insight into how large your problem is.

HTH

Ton van Overbeek
PS got 3 copies of your message by email. A bit annoying ;-).

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to