[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Relocation types in AVR GAS
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] Relocation types in AVR GAS |
Date: |
Tue, 22 Mar 2011 20:42:07 +0100 (MET) |
"Boyapati, Anitha" <address@hidden> wrote:
> I am trying to understand relocation types in AVR. To start with,
> can someone illustrate how R_AVR_16 works in the following case?
I can only guess. Don't know whether there's someone with more
insight.
> As I see it, since the address is 16-bit, 'size' is 1. How do we arrive
> at 'rightshift' and 'bitsize' entries?
No idea what rightshift is doing, you might get an idea by comparing
against other relocation types.
bitsize should be clear: it's a 16-bit relocation. My guess is that
bitsize might be different for other relocations even with the same
'size' field; compare that e.g. to the relative branch and jump
relocations (R_AVR_7_PCREL and R_AVR_13_PCREL).
> And how assembler knows to emit
> R_AVR_16 type?
Probably from the instruction it is connected with. Obviously,
R_AVR_16 only applies to instructions like STS/LDS etc.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)