Skip to content

Commit d49e480

Browse files
committed
Add GP-relative relocations
1 parent 7b406c1 commit d49e480

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

riscv-elf.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,13 @@ Description:: Additional information about the relocation
428428
<| S + A - P
429429
.2+| 46 .2+| RVC_LUI .2+| Static | _CI-Type_ .2+| High 6 bits of 18-bit absolute address
430430
<| S + A
431-
.2+| 47-50 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
431+
.2+| 47 .2+| GPREL_LO12_I .2+| Static | _I-type_ .2+| Low 12 bits of a 32-bit GP-relative address, `%gprel_lo(symbol)`
432+
<| S + A - GP
433+
.2+| 48 .2+| GPREL_LO12_S .2+| Static | _S-Type_ .2+| Low 12 bits of a 32-bit GP-relative address, `%gprel_lo(symbol)`
434+
<| S + A - GP
435+
.2+| 49 .2+| GPREL_HI20 .2+| Static | _U-Type_ .2+| High 20 bits of a 32-bit GP-relative address, `%gprel_hi(symbol)`
436+
<| S + A - GP
437+
.2+| 50 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
432438
<|
433439
.2+| 51 .2+| RELAX .2+| Static | .2+| Instruction can be relaxed, paired with a normal relocation at the same address
434440
<|

0 commit comments

Comments
 (0)