Lines Matching full:tls
30 * Define stubs for TLS internals so that programs and libraries can
68 void _rtld_free_tls(void *tls, size_t tcbsize, size_t tcbalign);
70 void __libc_free_tls(void *tls, size_t tcbsize, size_t tcbalign);
141 * There are two versions of variant I of TLS
144 * where TP points to start of TCB followed by aligned TLS segment.
145 * Both TCB and TLS must be aligned to alignment of TLS section. The TCB[0]
147 * Note: for Local Exec TLS Model, the offsets from TP (TCB in this case) to
148 * TLS variables are computed by linker, so we cannot overalign TLS section.
151 * where TP points (with bias) to TLS and TCB immediately precedes TLS without
152 * any alignment gap[4]. Only TLS should be aligned. The TCB[0] points to DTV
158 * www.akkadia.org/drepper/tls.pdf
174 * Return pointer to allocated TLS block
196 * Free Static TLS using the Variant I method. The tcbsize
211 * Allocate Static TLS using the Variant I method.
214 * TLS block:
218 * | pre gap | extended TCB | TCB | post gap | TLS segment |
224 * post_size is used to adjust TCB to TLS alignment for first version of TLS
227 * TLS alignment for second version.
235 char *tls_block, *tls; in __libc_allocate_tls() local
256 /* Allocate whole TLS block */ in __libc_allocate_tls()
264 tls = (char *)tcb + TLS_TCB_SIZE + post_size; in __libc_allocate_tls()
273 dtv->dtv_slots[0].dtvs_tls = tls; in __libc_allocate_tls()
285 dtv->dtv_slots[0].dtvs_tls = tls; in __libc_allocate_tls()
288 memcpy(tls, libc_tls_init, libc_tls_init_size); in __libc_allocate_tls()
299 * Free Static TLS using the Variant II method.
309 * Figure out the size of the initial TLS block so that we can in __libc_free_tls()
323 * Allocate Static TLS using the Variant II method.
329 char *tls_block, *tls; in __libc_allocate_tls() local
352 tls = (char *)tcb - libc_tls_static_space; in __libc_allocate_tls()
358 dtv->dtv_slots[0].dtvs_tls = tls; in __libc_allocate_tls()
362 * Copy the static TLS block over whole. in __libc_allocate_tls()
364 memcpy(tls, (const char *)oldtcb - libc_tls_static_space, in __libc_allocate_tls()
374 memcpy(tls, libc_tls_init, libc_tls_init_size); in __libc_allocate_tls()
375 memset(tls + libc_tls_init_size, 0, in __libc_allocate_tls()
410 void *tls; in _init_tls() local
446 tls = _rtld_allocate_tls(NULL, TLS_TCB_SIZE, TLS_TCB_ALIGN); in _init_tls()
448 _tcb_set(tls); in _init_tls()