From cf58f125663db4a13ee86edfb2ea401257da08a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lui=CC=81s=20Marques?= Date: Sat, 12 Aug 2023 11:35:14 +0100 Subject: [PATCH] Add GP-relative relocations --- riscv-elf.adoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/riscv-elf.adoc b/riscv-elf.adoc index 0839c108..b6d1c5f3 100644 --- a/riscv-elf.adoc +++ b/riscv-elf.adoc @@ -452,7 +452,13 @@ Description:: Additional information about the relocation <| 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+| 62 .2+| GPREL_HI20 .2+| Static | _U-Type_ .2+| High 20 bits of a 32-bit GP-relative address, `%gprel_hi(symbol)` + <| S + A - GP +.2+| 63 .2+| GPREL_LO12_I .2+| Static | _I-type_ .2+| Low 12 bits of a 32-bit GP-relative address, `%gprel_lo(symbol)` + <| S + A - GP +.2+| 64 .2+| GPREL_LO12_S .2+| Static | _S-Type_ .2+| Low 12 bits of a 32-bit GP-relative address, `%gprel_lo(symbol)` + <| S + A - GP +.2+| 65-191 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use <| .2+| 192-255 .2+| *Reserved* .2+| - | .2+| Reserved for nonstandard ABI extensions <|