Skip to content

Commit

Permalink
Merge pull request #396 from ishitatsuyuki/tlsdesc-fix-ie-example
Browse files Browse the repository at this point in the history
Fix TLSDESC -> Initial Exec example.
  • Loading branch information
kito-cheng authored Sep 14, 2023
2 parents 22468ff + af7fa55 commit 3e4edc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1684,8 +1684,8 @@ Condition::
Relaxation::

- Instruction associated with `R_RISCV_TLSDESC_HI20` or `R_RISCV_TLSDESC_LOAD_LO12_I` can be removed.
- Instruction associated with `R_RISCV_TLSDESC_ADD_LO12_I` can be replaced with load of the high PC-relative offset of the symbol's GOT entry.
- Instruction associated with `R_RISCV_TLSDESC_CALL` can be replaced with load of the low PC-relative offset of the symbol's GOT entry.
- Instruction associated with `R_RISCV_TLSDESC_ADD_LO12_I` can be replaced with load of the high half of the symbol's GOT address.
- Instruction associated with `R_RISCV_TLSDESC_CALL` can be replaced with load of the low half of the symbol's GOT address.
Example::
+
--
Expand All @@ -1704,7 +1704,7 @@ Relaxation result:

[,asm]
----
lui a0, <pcrel-got-offset-for-symbol-hi>
auipc a0, <pcrel-got-offset-for-symbol-hi>
{ld,lw} a0, <pcrel-got-offset-for-symbol-lo>(a0)
----
--
Expand Down

0 comments on commit 3e4edc7

Please sign in to comment.