Skip to content

Commit

Permalink
Merge pull request #421 from MaskRay/tlsdesc-relax
Browse files Browse the repository at this point in the history
Relaxable TLSDESC only requires that R_RISCV_TLSDESC_HI20 to be paired with R_RISCV_RELAX
  • Loading branch information
kito-cheng authored Feb 15, 2024
2 parents 7044e16 + c96a69e commit 5ffe5b5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1848,9 +1848,9 @@ Relaxation candidate (`tX` and `tY` can be any combination of two general purpos
----
label:
auipc tX, <hi> // R_RISCV_TLSDESC_HI20 (symbol), R_RISCV_RELAX
lw tY, tX, <lo> // R_RISCV_TLSDESC_LOAD_LO12 (label), R_RISCV_RELAX
addi a0, tX, <lo> // R_RISCV_TLSDESC_ADD_LO12 (label), R_RISCV_RELAX
jalr t0, tY // R_RISCV_TLSDESC_CALL (label), R_RISCV_RELAX
lw tY, tX, <lo> // R_RISCV_TLSDESC_LOAD_LO12 (label)
addi a0, tX, <lo> // R_RISCV_TLSDESC_ADD_LO12 (label)
jalr t0, tY // R_RISCV_TLSDESC_CALL (label)
----

Relaxation result:
Expand Down Expand Up @@ -1889,9 +1889,9 @@ Relaxation candidate (`tX` and `tY` can be any combination of two general purpos
----
label:
auipc tX, <hi> // R_RISCV_TLSDESC_HI20 (symbol), R_RISCV_RELAX
lw tY, tX, <lo> // R_RISCV_TLSDESC_LOAD_LO12 (label), R_RISCV_RELAX
addi a0, tX, <lo> // R_RISCV_TLSDESC_ADD_LO12 (label), R_RISCV_RELAX
jalr t0, tY // R_RISCV_TLSDESC_CALL (label), R_RISCV_RELAX
lw tY, tX, <lo> // R_RISCV_TLSDESC_LOAD_LO12 (label)
addi a0, tX, <lo> // R_RISCV_TLSDESC_ADD_LO12 (label)
jalr t0, tY // R_RISCV_TLSDESC_CALL (label)
----

Relaxation result (long form):
Expand Down

0 comments on commit 5ffe5b5

Please sign in to comment.