Skip to content

Commit c3f8269

Browse files
committed
Define PLT-generating PC-Relative data relocation
This introduces a new relocation `R_RISCV_PLT32` that follows the existing wording for the “R_RISCV_CALL” and “R_RISCV_CALL_PLT” types, but rather than modifying an instruction, it fills a whole, naturally aligned, 32-bit data location with the signed byte offset from its own location to the PLT entry for the target symbol. If the relocation is within +/-2GB of the target symbol, the linker may relax this to a R_RISCV_32_PCREL.
1 parent 9a77e88 commit c3f8269

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

riscv-elf.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,9 @@ Description:: Additional information about the relocation
445445
<| S + A - P
446446
.2+| 58 .2+| IRELATIVE .2+| Dynamic | _wordclass_ .2+| Relocation against a non-preemptible ifunc symbol
447447
<| `ifunc_resolver(B + A)`
448-
.2+| 59-191 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
448+
.2+| 59 .2+| PLT32 .2+| Static | _word32_ .2+| 32-bit relative offset to a function or its PLT entry
449+
<| S + A - P
450+
.2+| 60-191 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
449451
<|
450452
.2+| 192-255 .2+| *Reserved* .2+| - | .2+| Reserved for nonstandard ABI extensions
451453
<|

0 commit comments

Comments
 (0)