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

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

Re: [avr-gcc-list] Trouble with: relocation truncated tofit:R_AVR_13_PCR


From: Georg-Johann Lay
Subject: Re: [avr-gcc-list] Trouble with: relocation truncated tofit:R_AVR_13_PCREL
Date: Thu, 16 Jun 2011 10:37:31 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20100302)

Boyapati, Anitha schrieb:
> 
>> -----Original Message-----
>> From: address@hidden
>> [mailto:address@hidden On
>> Behalf Of Joerg Wunsch
>> Sent: Thursday, June 16, 2011 11:30 AM
>> To: address@hidden
>> Subject: Re: [avr-gcc-list] Trouble with: relocation truncated
>> tofit:R_AVR_13_PCREL
>>
>> "Boyapati, Anitha" <address@hidden> wrote:
>>
>>> 1. Why can't rcall/rjmp be used against external symbols?
>> They can, and they (usually) do.
>>
>>> If the value falls outside the legal range, linker relaxation can
>>> handle it.
>> No.  Linker relaxations can only work the other way: replace longer
>> jumps/calls by smaller ones. 
> 
> Hmm, interesting. 
> 

The reason why linker must not increase instruction sizes is that
branches (BRXX) could fall out of range and the linker would have to
relax them also by inserting, e.g. reversed branch over a jump. This
gets considerably complicated if the branch is inside a skip. Note
that local labels are already resolved by gas, so that it would be
necessary to move much logic from gas to ld and reimplement it in avr
part. It's doable and I see it being done for other architectures, but
it's much work.

Johann

> 
> Anitha
> 




reply via email to

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