From 43fbb2b2393049998611c58eb5cde54ab02cea10 Mon Sep 17 00:00:00 2001 From: Kuan-Lin Chen Date: Mon, 2 Dec 2019 09:08:22 +0800 Subject: [PATCH] Add R_RISCV_SET_ULEB128 and R_RISCV_SUB_ULEB128. In order to implement uleb128 subtraction, we need two relocations for the linker to re-calculate the value after relaxing. --- riscv-elf.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/riscv-elf.md b/riscv-elf.md index c3c49de3..a69edbe6 100644 --- a/riscv-elf.md +++ b/riscv-elf.md @@ -504,7 +504,9 @@ Enum | ELF Reloc Type | Description | Details 55 | R_RISCV_SET16 | Local label subtraction | 56 | R_RISCV_SET32 | Local label subtraction | 57 | R_RISCV_32_PCREL | PC-relative reference | word32 = S + A - PC -58-191 | *Reserved* | Reserved for future standard use | +58 | R_RISCV_SET_ULEB128 | Local label subtraction | uleb128 = S + A +59 | R_RISCV_SUB_ULEB128 | Local label subtraction | uleb128 = old - S - A +60-191 | *Reserved* | Reserved for future standard use | 192-255 | *Reserved* | Reserved for nonstandard ABI extensions | Nonstandard extensions are free to use relocation numbers 192-255 for any @@ -904,4 +906,4 @@ wint_t | 4 | 4 The following definitions apply for all ABIs defined in this document. Here there is no differentiation between ILP32 and LP64 abis. -`wchar_t` is signed. `wint_t` is unsigned. \ No newline at end of file +`wchar_t` is signed. `wint_t` is unsigned.