32-bit x86: Thread-Local Storage Relocation Types
The TLS relocations that are listed in the following table are defined for x86. Descriptions in the table use the following notation.
-
@tlsgd(x)
-
Allocates two contiguous entries in the
GOT
to hold aTLS_index
structure. This structure is passed to___tls_get_addr
(). The instruction referencing this entry will be bound to the first of the twoGOT
entries. -
@tlsgdplt(x)
-
This relocation is handled as if it were a
R_386_PLT32
relocation referencing the___tls_get_addr
() function. -
@tlsldm(x)
-
Allocates two contiguous entries in the
GOT
to hold aTLS_index
structure. This structure is passed to the___tls_get_addr
(). Theti_tlsoffset
field of theTLS_index
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. -
@gotntpoff(x)
-
Allocates a entry in the
GOT
, and initializes the entry with the negativetlsoffset
relative to the static TLS block. This sequence is performed at runtime using theR_386_TLS_TPOFF
relocation. -
@indntpoff(x)
-
This expression is similar to
@gotntpoff
, but is used in position dependent code.@gotntpoff
resolves to aGOT
slot address relative to the start of theGOT
in themovl
oraddl
instructions.@indntpoff
resolves to the absoluteGOT
slot address. -
@ntpoff(x)
-
Calculates the negative
tlsoffset
relative to the static TLS block. -
@dtpoff(x)
-
Calculates the
tlsoffset
relative to the TLS block. The value is used as an immediate value of an addend and is not associated with a specific register. -
@dtpmod(x)
-
Calculates the object identifier of the object containing a TLS symbol.
Table 16-17 32-bit x86: Thread-Local Storage Relocation Types
Name | Value | Field | Calculation |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|