SLAA534A June 2013 – June 2020
Relocation types are described in two tables. Table 11-5 gives numeric values for the relocation types and summarizes the computation of the relocated value. Following that table is a description of the relocation types and examples of their use. Table 11-6 describes, for each type, the exact computation, including extraction and insertion of the relocation field, overflow checking, and any scaling or other adjustments.
The following notations are used in Table 11-5.
S | The value of the symbol associated with the relocation, specified by the symbol table index contained in the r_info field in the relocation entry. |
A | The addend used to compute the value of the relocatable field. For Elf32_rel relocations, A is encoded into the relocatable field according to Table 11-6. For Elf32_Rela relocations, A is given by the r_addend field of the relocation entry. |
PC | The address of the container containing the field. This may not be the same as the address of the instruction containing the relocation. |
Name | Value | Operation | Constraints |
---|---|---|---|
R_MSP430_NONE | 0 | ||
R_MSP430_ABS32 | 1 | S + A | |
R_MSP430_ABS16 | 2 | S + A | |
R_MSP430_ABS8 | 3 | S + A | |
R_MSP430_PCR16 | 4 | S + A - PC | |
R_MSP430X_PCR20_EXT_SRC | 5 | S + A - PC | |
R_MSP430X_PCR20_EXT_DST | 6 | S + A - PC | |
R_MSP430X_PCR20_EXT_ODST | 7 | S + A - PC | |
R_MSP430X_ABS20_EXT_SRC | 8 | S + A | |
R_MSP430X_ABS20_EXT_DST | 9 | S + A | |
R_MSP430X_ABS20_EXT_ODST | 10 | S + A | |
R_MSP430X_ABS20_ADR_SRC | 11 | S + A | |
R_MSP430X_ABS20_ADR_DST | 12 | S + A | |
R_MSP430X_PCR16 | 13 | S + A - PC | |
R_MSP430X_PCR20_CALL | 14 | S + A - PC | |
R_MSP430X_ABS16 | 15 | S + A | |
R_MSP430_ABS_HI16 | 16 | S + A | Rela only |
R_MSP430_PREL31 | 17 | S + A - PC |