avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] Meaning of "relocation truncated to fit:R_AVR_13_PCRE


From: Weddington, Eric
Subject: RE: [avr-gcc-list] Meaning of "relocation truncated to fit:R_AVR_13_PCREL"?
Date: Wed, 25 Feb 2009 12:57:57 -0700

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Bob Paddock
> Sent: Wednesday, February 25, 2009 12:41 PM
> To: avr-gcc-list
> Subject: [avr-gcc-list] Meaning of "relocation truncated to 
> fit:R_AVR_13_PCREL"?
> 
> What does this error mean?:
> 
> g:/winavr~4/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25
> /crttn88.o:(.init9+0x2):
>  relocation truncated to fit: R_AVR_13_PCREL against symbol `exit'
> defined in .fini9 section in g:/winavr~4/bin/../lib/gcc/avr/4.3.2 \
> /avr25\libgcc.a(_exit.o)
> make[1]: *** [LT_A.elf] Error 1
> make: *** [all] Error 2
> 
> There is no 'exit' in my code; _exit() exits from Main, have not added
> OS_Main yet.
> 
> Seems code size related.
> 4420 bytes fit before the error triggers.

Yeah, it took me a while to figure this one out, but I finally did recently. 
FYI, you also ran into a bug that has now been fixed, but not yet released.

The R_AVR_13_PCREL relocation is typically where a rjmp/rcall is not working 
due to total code size. The "13_PCREL" part means a 13-bit relative to PC. 
RJMP/RCALL can address +/- 2K words, hence 8K bytes total range and 2^13 = 8K.

You're using tiny88 which is avr25 architecture. There was a bug recently in 
binutils, where it wasn't probably doing the wraparound for this relocation 
because the avr25 arch was forgotten to be added to a list. This is fixed now 
and will be in the next WinAVR release.

I'm trying to get a WinAVR RC out this week. We should see if that helps your 
situation.

Eric Weddington




reply via email to

[Prev in Thread] Current Thread [Next in Thread]