Skip to content

Commit 4c1b198

Browse files
committed
[sysvabi64] Correct local exec instruction to use tp as input
Change the input register in add xn, xn, :tprel_hi12:var, lsl #12 to the thread pointer tp. We want to calculate the offset from the thread pointer so it needs to be an input of the add.
1 parent be64777 commit 4c1b198

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sysvabi64/sysvabi64.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,7 @@ block is smaller than 16 KiB.
21992199

22002200
.. code-block:: asm
22012201
2202-
add xn, xn, :tprel_hi12:var, lsl #12 // R_AARCH64_TLSLE_ADD_TPREL_HI12 var
2202+
add xn, tp, :tprel_hi12:var, lsl #12 // R_AARCH64_TLSLE_ADD_TPREL_HI12 var
22032203
add xn, xn, :tprel_lo12_nc:var // R_AARCH64_TLSLE_ADD_TPREL_LO12_NC var
22042204
// offset of var from tp in xn
22052205

0 commit comments

Comments
 (0)