Skip to content

Commit df8b80b

Browse files
authored
Merge pull request #394 from luismarques/elf-gp
Add GP-relative relocations
2 parents 3e4edc7 + d49e480 commit df8b80b

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
@@ -430,7 +430,13 @@ Description:: Additional information about the relocation
430430
<| S + A - P
431431
.2+| 46 .2+| RVC_LUI .2+| Static | _CI-Type_ .2+| High 6 bits of 18-bit absolute address
432432
<| S + A
433-
.2+| 47-50 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
433+
.2+| 47 .2+| GPREL_LO12_I .2+| Static | _I-type_ .2+| Low 12 bits of a 32-bit GP-relative address, `%gprel_lo(symbol)`
434+
<| S + A - GP
435+
.2+| 48 .2+| GPREL_LO12_S .2+| Static | _S-Type_ .2+| Low 12 bits of a 32-bit GP-relative address, `%gprel_lo(symbol)`
436+
<| S + A - GP
437+
.2+| 49 .2+| GPREL_HI20 .2+| Static | _U-Type_ .2+| High 20 bits of a 32-bit GP-relative address, `%gprel_hi(symbol)`
438+
<| S + A - GP
439+
.2+| 50 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
434440
<|
435441
.2+| 51 .2+| RELAX .2+| Static | .2+| Instruction can be relaxed, paired with a normal relocation at the same address
436442
<|

0 commit comments

Comments
 (0)