Skip to content

Commit

Permalink
Add GP-relative relocations
Browse files Browse the repository at this point in the history
  • Loading branch information
luismarques committed Aug 16, 2023
1 parent 7b406c1 commit d49e480
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,13 @@ Description:: Additional information about the relocation
<| S + A - P
.2+| 46 .2+| RVC_LUI .2+| Static | _CI-Type_ .2+| High 6 bits of 18-bit absolute address
<| S + A
.2+| 47-50 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
.2+| 47 .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+| 48 .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+| 49 .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+| 50 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
<|
.2+| 51 .2+| RELAX .2+| Static | .2+| Instruction can be relaxed, paired with a normal relocation at the same address
<|
Expand Down

0 comments on commit d49e480

Please sign in to comment.