mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Fix inner loop
start count condition, use TOTAL instead of variable that was never set. Fix outer loop termination condition to TOTAL >= after update. * sysdeps/generic/libc-tls.c (__libc_setup_tls): Initialize dl_tls_static_align and dl_tls_static_nelem.
This commit is contained in:
@ -162,11 +162,15 @@ __libc_setup_tls (size_t tcbsize, size_t tcbalign)
|
||||
GL(dl_tls_dtv_slotinfo_list) = &static_slotinfo.si;
|
||||
|
||||
/* That is the size of the TLS memory for this object. */
|
||||
GL(dl_tls_static_size) = (roundup (memsz, align ?: 1)
|
||||
# if TLS_TCB_AT_TP
|
||||
GL(dl_tls_static_size) = roundup (memsz, align ?: 1) + tcbsize;
|
||||
#else
|
||||
GL(dl_tls_static_size) = roundup (memsz, align ?: 1);
|
||||
#endif
|
||||
+ tcbsize
|
||||
# endif
|
||||
);
|
||||
/* The alignment requirement for the static TLS block. */
|
||||
GL(dl_tls_static_align) = MAX (TLS_TCB_ALIGN, max_align);
|
||||
/* Number of elements in the static TLS block. */
|
||||
GL(dl_tls_static_nelem) = GL(dl_tls_max_dtv_idx);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user