SPARC: Thread-Local Storage Relocation Types
The TLS relocations that are listed in the following table are defined for SPARC. Descriptions in the table use the following notation.
-
@dtlndx(x)
-
Allocates two contiguous entries in the
GOT
to hold aTLS_index
structure. This information is passed to__tls_get_addr
(). The instruction referencing this entry is bound to the address of the first of the twoGOT
entries. -
@tmndx(x)
-
Allocates two contiguous entries in the
GOT
to hold aTLS_index
structure. This information is passed to__tls_get_addr
(). Theti_tlsoffset
field of this structure is set to0
, and theti_moduleid
is filled in at runtime. The call to__tls_get_addr
() returns the starting offset of the dynamic TLS block. -
@dtpoff(x)
-
Calculates the
tlsoffset
relative to the TLS block. -
@tpoff(x)
-
Calculates the negative
tlsoffset
relative to the static TLS block. This value is added to the thread-pointer to calculate the TLS address. -
@dtpmod(x)
-
Calculates the object identifier of the object containing a TLS symbol.
Table 16-7 SPARC: Thread-Local Storage Relocation Types
Name | Value | Field | Calculation |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
None |
Refer to the explanation following this table. |
|
|
|
Refer to the explanation following this table. |
|
|
|
|
|
|
|
|
|
|
None |
Refer to the explanation following this table. |
|
|
|
Refer to the explanation following this table. |
|
|
|
|
|
|
|
|
|
|
None |
Refer to the explanation following this table. |
|
|
|
|
|
|
|
|
|
|
None |
Refer to the explanation following this table. |
|
|
None |
Refer to the explanation following this table. |
|
|
None |
Refer to the explanation following this table. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some relocation types have semantics beyond simple calculations.
-
R_SPARC_TLS_GD_ADD
-
This relocation tags the
add
instruction of aGD
code sequence. The register used for theGOT
-pointer is the first register in the sequence. The instruction tagged by this relocation comes before thecall
instruction tagged by theR_SPARC_TLS_GD_CALL
relocation. This relocation is used to transition between TLS models at link-edit time. -
R_SPARC_TLS_GD_CALL
-
This relocation is handled as if it were a
R_SPARC_WPLT30
relocation referencing the__tls_get_addr
() function. This relocation is part of aGD
code sequence. -
R_SPARC_LDM_ADD
-
This relocation tags the first
add
instruction of aLD
code sequence. The register used for theGOT
-pointer is the first register in the sequence. The instruction tagged by this relocation comes before thecall
instruction tagged by theR_SPARC_TLS_GD_CALL
relocation. This relocation is used to transition between TLS models at link-edit time. -
R_SPARC_LDM_CALL
-
This relocation is handled as if it were a
R_SPARC_WPLT30
relocation referencing the__tls_get_addr
() function. This relocation is part of aLD
code sequence. -
R_SPARC_LDO_ADD
-
This relocation tags the final
add
instruction in aLD
code sequence. The register which contains the object address that is computed in the initial part of the code sequence is the first register in this instruction. This relocation permits the link-editor to identify this register for code transformations. -
R_SPARC_TLS_IE_LD
-
This relocation tags the
ld
instruction in the 32-bitIE
code sequence. This relocation is used to transition between TLS models at link-edit time. -
R_SPARC_TLS_IE_LDX
-
This relocation tags the
ldx
instruction in the 64-bitIE
code sequence. This relocation is used to transition between TLS models at link-edit time. -
R_SPARC_TLS_IE_ADD
-
This relocation tags the
add
instruction in theIE
code sequence. The register that is used for theGOT
-pointer is the first register in the sequence.