Skip to content

Commit e03d44a

Browse files
authored
Merge pull request #507 from riscv-non-isa/kitoc/pcrel-lo12-got-hi20
2 parents e852098 + 4c76423 commit e03d44a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

riscv-elf.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,9 +1125,9 @@ Description:: Additional information about the relocation
11251125
.2+| 23 .2+| PCREL_HI20 .2+| Static | _U-Type_ .2+| High 20 bits of 32-bit PC-relative reference, `%pcrel_hi(symbol)`
11261126
<| S + A - P
11271127
.2+| 24 .2+| PCREL_LO12_I .2+| Static | _I-type_ .2+| Low 12 bits of a 32-bit PC-relative, `%pcrel_lo(address of %pcrel_hi)`, the addend must be 0
1128-
<| S - P
1128+
<| Same as the paired high-part relocation
11291129
.2+| 25 .2+| PCREL_LO12_S .2+| Static | _S-Type_ .2+| Low 12 bits of a 32-bit PC-relative, `%pcrel_lo(address of %pcrel_hi)`, the addend must be 0
1130-
<| S - P
1130+
<| Same as the paired high-part relocation
11311131
.2+| 26 .2+| HI20 .2+| Static | _U-Type_ .2+| High 20 bits of 32-bit absolute address, `%hi(symbol)`
11321132
<| S + A
11331133
.2+| 27 .2+| LO12_I .2+| Static | _I-Type_ .2+| Low 12 bits of 32-bit absolute address, `%lo(symbol)`
@@ -1195,9 +1195,9 @@ Description:: Additional information about the relocation
11951195
.2+| 62 .2+| TLSDESC_HI20 .2+| Static | _U-Type_ .2+| High 20 bits of a 32-bit PC-relative offset into a TLS descriptor entry, `%tlsdesc_hi(symbol)`
11961196
<| S + A - P
11971197
.2+| 63 .2+| TLSDESC_LOAD_LO12 .2+| Static | _I-Type_ .2+| Low 12 bits of a 32-bit PC-relative offset into a TLS descriptor entry, `%tlsdesc_load_lo(address of %tlsdesc_hi)`, the addend must be 0
1198-
<| S - P
1198+
<| Same as the paired high-part relocation
11991199
.2+| 64 .2+| TLSDESC_ADD_LO12 .2+| Static | _I-Type_ .2+| Low 12 bits of a 32-bit PC-relative offset into a TLS descriptor entry, `%tlsdesc_add_lo(address of %tlsdesc_hi)`, the addend must be 0
1200-
<| S - P
1200+
<| Same as the paired high-part relocation
12011201
.2+| 65 .2+| TLSDESC_CALL .2+| Static | .2+| Annotate call to TLS descriptor resolver function, `%tlsdesc_call(address of %tlsdesc_hi)`, for relaxation purposes only
12021202
<|
12031203
.2+| 66 .2+| *Reserved* .2+| - | .2+| Reserved for future standard use
@@ -1475,10 +1475,10 @@ instruction is used in conjunction with one or more I-Type instructions
14751475
instructions (store) with `R_RISCV_PCREL_LO12_S` relocations.
14761476

14771477
The `R_RISCV_PCREL_LO12_I` or `R_RISCV_PCREL_LO12_S` relocations contain
1478-
a label pointing to an instruction in the same section with an
1479-
`R_RISCV_PCREL_HI20` relocation entry that points to the target symbol:
1478+
a label pointing to an instruction in the same section with a high-part
1479+
relocation entry that points to the target symbol:
14801480

1481-
* At label: `R_RISCV_PCREL_HI20` relocation entry -> symbol
1481+
* At label: high-part relocation entry -> symbol
14821482
* `R_RISCV_PCREL_LO12_I` relocation entry -> label
14831483

14841484
To get the symbol address to perform the calculation to fill the 12-bit

0 commit comments

Comments
 (0)