SPRAC71B February 2019 – October 2023
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_C28X_NONE | 0 | ||
R_C28X_ABS8 | 1 | S + A | |
R_C28X_ABS16 | 2 | S + A | |
R_C28X_ABS32 | 3 | S + A | |
R_C28X_ABSLO6 | 4 | S+A | |
R_C28X_ABSLO6_BLKD | 4 | S+A | Duplicate, but indicates blocked access |
R_C28X_ABS22 | 5 | S+A | |
R_C28X_ABS22_BR | 5 | S+A | Duplicate, but used in function calls only |
R_C28X_HI6 | 6 | S+A | Rela only |
R_C28X_DP_HI10 | 7 | S+A-PC | Rela only |
R_C28X_DP_HI16 | 8 | S+A | |
R_C28X_PCREL16 | 9 | S+A-PC | |
R_C28X_PCREL8 | 10 | S+A-PC | |
R_C28X_HI16 | 11 | S+A | Rela only |
R_C28X_NEGWORD | 12 | special | |
R_C28X_NEGBYTE | 13 | special | |
R_C28X_ABS8_HI | 14 | ||
R_C28X_ABS13_SE16 | 15 | special | |
R_CLA_ABS16 | 16 | S+A | |
R_C28X_ABSLO7 | 17 | S+A | |
R_C28X_PREL31 | 18 | S+A-PC |