diff --git a/riscv-elf.adoc b/riscv-elf.adoc index 427489b4..fb4426e0 100644 --- a/riscv-elf.adoc +++ b/riscv-elf.adoc @@ -447,7 +447,11 @@ Description:: Additional information about the relocation <| `ifunc_resolver(B + A)` .2+| 59 .2+| PLT32 .2+| Static | _word32_ .2+| 32-bit relative offset to a function or its PLT entry <| S + A - P -.2+| 60-191 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use +.2+| 60 .2+| SET_ULEB128 .2+| Static | _ULEB128_ .2+| Local label assignment + <| S + A +.2+| 61 .2+| SUB_ULEB128 .2+| Static | _ULEB128_ .2+| Local label subtraction + <| V - S + A +.2+| 62-191 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use <| .2+| 192-255 .2+| *Reserved* .2+| - | .2+| Reserved for nonstandard ABI extensions <| @@ -501,6 +505,7 @@ of the `__global_pointer$` symbol into register `gp` (aka `x3`). | _word16_ | Specifies a 16-bit word | _word32_ | Specifies a 32-bit word | _word64_ | Specifies a 64-bit word +| _ULEB128_ | Specifies a variable-length data encoded in ULEB128 format. | _wordclass_ | Specifies a _word32_ field for ILP32 or a _word64_ field for LP64 | _B-Type_ | Specifies a field as the immediate field in a B-type instruction | _CB-Type_ | Specifies a field as the immediate field in a CB-type instruction @@ -1175,6 +1180,12 @@ are commonly resolved at compile-time, such as intra-function jumps), code generators must in general ensure that relocations are always emitted when relaxation is enabled. +Linker should adjust relocations which refer to those symbol has updated the +address. + +ULEB128 value with relocation must be padding to the same length even if the +data can be encoded with a shorter byte sequence after linker relaxation. + === Linker Relaxation Types The purpose of this section is to describe all types of linker relaxation,