From 537ef5dbb5044dbb811e6afd652c9c9a9d0e3e2e Mon Sep 17 00:00:00 2001 From: Derek Hower Date: Tue, 19 Nov 2024 09:21:42 -0800 Subject: [PATCH] Mock-up of a relocation --- arch/relocation/R_RISCV_PCREL_L012_I.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 arch/relocation/R_RISCV_PCREL_L012_I.yaml diff --git a/arch/relocation/R_RISCV_PCREL_L012_I.yaml b/arch/relocation/R_RISCV_PCREL_L012_I.yaml new file mode 100644 index 000000000..cb7772637 --- /dev/null +++ b/arch/relocation/R_RISCV_PCREL_L012_I.yaml @@ -0,0 +1,14 @@ +$schema: reolaction_schema.json# +kind: relocation +variable_name: "I-Type" +relocation_variable_description: Specifies a field as the immediate field in an I-type instruction +relocation_type: R_RISCV_PCREL_LO12_I +relocation_description: | + Low 12 bits of a 32-bit PC-relative, + `%pcrel_lo(address of %pcrel_hi)`, the + addend must be 0. +calculation: S - P # calculation, using symbols defined in ABI doc 8.4.1 +number: 24 # the number of the relocation, encoded in the r_info field +type: static # relocation type (static, dynamic, both) + +