R_AVR32_NONE |
No relocation needed. Usually used as a placeholder for relocations that are removed. |
| Data relocations |
R_AVR32_32 |
Normal data. Just stick the value of sym + addend in the output file. |
R_AVR32_16 |
R_AVR32_8 |
R_AVR32_32_PCREL |
PC-relative relocation. Resolves to sym + addend - offset. |
R_AVR32_16_PCREL |
R_AVR32_8_PCREL |
R_AVR32_DIFF32 |
Difference between two labels: L2 - L1. The value of L1 is encoded as sym + addend, while the initial difference after assembly is inserted into the object file by the assembler. |
R_AVR32_DIFF16 |
R_AVR32_DIFF8 |
R_AVR32_GOT32 |
Reference to a symbol through the GlobalOffsetTable . The linker will allocate an entry for symbol in the GlobalOffsetTable and insert the offset of this entry as the relocation value. addend must be zero. |
R_AVR32_GOT16 |
R_AVR32_GOT8 |
| Normal code relocations |
R_AVR32_21S |
Alignment and signedness is indicated by the suffixes. S means signed, U means unsigned. W means word-aligned, H means halfword-aligned, neither means byte-aligned (no alignment.) |
R_AVR32_16U |
R_AVR32_16S |
R_AVR32_8S |
R_AVR32_8S_EXT |
R_AVR32_15S |
Signed, word-aligned 17-bit address for MEMC, MEMS and MEMT |
| PC-relative code relocations |
R_AVR32_22H_PCREL |
PC-relative relocations are signed if neither 'U' nor 'S' is specified. However, we explicitly tack on a 'B' to indicate no alignment, to avoid confusion with data relocs. All of these resolve to sym + addend - offset. |
R_AVR32_18W_PCREL |
R_AVR32_16B_PCREL |
R_AVR32_14UW_PCREL |
R_AVR32_11H_PCREL |
R_AVR32_10UW_PCREL |
R_AVR32_9H_PCREL |
R_AVR32_9UW_PCREL |
R_AVR32_16N_PCREL |
Negative PC-relative relocation. This resolves to offset - sym - addend. |
| Special Code Relocations |
R_AVR32_HI16 |
Resolves to ((sym + addend) >> 16 ) & 0xffff |
R_AVR32_LO16 |
Resolves to (sym + addend) & 0xffff |
| PIC relocations |
R_AVR32_GOTPC |
Subtract the link-time address of the GlobalOffsetTable from (symbol + addend) and insert the result. The reason for this apparently backwards definition is that one can, at least theoretically, load the GOT pointer with a "sub reg, pc, imm" instruction. If we at some point add a relocation for this, it will have the same basic semantics as this relocation.
|
R_AVR32_GOTCALL |
This is inserted by the assembler for call instructions when the options --linkrelax and --pic are given. It's usually relaxed into a more efficient form, but in case it's not, it expands to:
mov lr, (got offset / 4)
ld.w lr, r6[lr << 2]
icall lr |
R_AVR32_LDA_GOT |
This is inserted by the assembler for lda.w instructions when the options --linkrelax and --pic are given. It's usually relaxed into a more efficient form, but in case it's not, it expands to:
mov reg, (got offset / 4)
ld.w reg, r6[reg << 2] |
R_AVR32_GOT21S |
Reference to a symbol through the GlobalOffsetTable . The linker will allocate an entry for symbol in the GlobalOffsetTable and insert the offset of this entry as the relocation value. addend must be zero. As usual, 'S' means signed, 'W' means word-aligned, etc. |
R_AVR32_GOT18SW |
R_AVR32_GOT16S |
R_AVR32_GOT7UW |
| Constant Pool relocations |
R_AVR32_32_CPENT |
32-bit constant pool entry. I don't think 8- and 16-bit entries make a whole lot of sense. |
R_AVR32_CPCALL |
Constant pool references. Some of these relocations are signed, others are unsigned. It doesn't really matter, since the constant pool always comes after the code that references it. |
R_AVR32_16_CP |
R_AVR32_9W_CP |
| Dynamic Relocations |
| Dynamic relocations means relocations that may be present in the final executable and in shared libraries. Such relocations must be fixed up by the DynamicLinker before transferring execution to the program. |
R_AVR32_RELATIVE |
Add the module's load offset to the data already there (or addend, which is the same as the contents.) |
R_AVR32_GLOB_DAT |
Insert the value of symbol + addend. |
R_AVR32_JMP_SLOT |
Same as R_AVR32_GLOB_DAT, but initialized to point to a function stub which fixes up the entry on-demand. The DynamicLinker may do LazyBinding on these relocs by treating it as a RELATIVE reloc initially. |
| Linkrelax Information |
R_AVR32_ALIGN |
Align the current address upwards to a multiple of 1 << addend bytes. sym must be the AbsoluteSymbol . |