Skip to content

Commit

Permalink
Merge pull request #185 from riscv/pcrel_lo12
Browse files Browse the repository at this point in the history
Clarify that addend of R_RISCV_PCREL_LO12_[IS] must be 0
  • Loading branch information
kito-cheng authored Jun 14, 2021
2 parents c67e860 + 007a368 commit 388954f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions riscv-elf.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ Enum | ELF Reloc Type | Description | Field | C
21 | R_RISCV_TLS_GOT_HI20 | PC-relative TLS IE GOT offset | _U-Type_ | | Macro `la.tls.ie`
22 | R_RISCV_TLS_GD_HI20 | PC-relative TLS GD reference | _U-Type_ | | Macro `la.tls.gd`
23 | R_RISCV_PCREL_HI20 | PC-relative reference | _U-Type_ | S + A - P | `%pcrel_hi(symbol)`
24 | R_RISCV_PCREL_LO12_I | PC-relative reference | _I-type_ | S + A - P | `%pcrel_lo(address of %pcrel_hi)`
25 | R_RISCV_PCREL_LO12_S | PC-relative reference | _S-Type_ | S + A - P | `%pcrel_lo(address of %pcrel_hi)`
24 | R_RISCV_PCREL_LO12_I | PC-relative reference | _I-type_ | S - P | `%pcrel_lo(address of %pcrel_hi)`, the addend must be 0
25 | R_RISCV_PCREL_LO12_S | PC-relative reference | _S-Type_ | S - P | `%pcrel_lo(address of %pcrel_hi)`, the addend must be 0
26 | R_RISCV_HI20 | Absolute address | _U-Type_ | S + A | `%hi(symbol)`
27 | R_RISCV_LO12_I | Absolute address | _I-Type_ | S + A | `%lo(symbol)`
28 | R_RISCV_LO12_S | Absolute address | _S-Type_ | S + A | `%lo(symbol)`
Expand Down

0 comments on commit 388954f

Please sign in to comment.