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 14, 2023
1 parent 7b406c1 commit dcdbf4d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,11 @@ 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-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 All @@ -452,7 +456,9 @@ Description:: Additional information about the relocation
<| S + A
.2+| 61 .2+| SUB_ULEB128 .2+| Static | _ULEB128_ .2+| Local label subtraction <<uleb128-note,*note>>
<| V - S - A
.2+| 62-191 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
.2+| 62 .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+| 65-191 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
<|
.2+| 192-255 .2+| *Reserved* .2+| - | .2+| Reserved for nonstandard ABI extensions
<|
Expand Down

0 comments on commit dcdbf4d

Please sign in to comment.