(_dl_allocate_tls_init): Store dtv pointer at correct index. Clear BSS region now that memalign is used.
This commit is contained in:
parent
4f6da0f5d8
commit
84bdcade74
|
@ -292,11 +292,11 @@ _dl_allocate_tls_init (void *result)
|
||||||
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
|
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* We don't have to clear the BSS part of the TLS block
|
/* Copy the initialization image and clear the BSS part. */
|
||||||
since mmap is used to allocate the memory which
|
dtv[map->l_tls_modid].pointer = dest;
|
||||||
guarantees it is initialized to zero. */
|
memset (__mempcpy (dest, map->l_tls_initimage,
|
||||||
dtv[cnt].pointer = memcpy (dest, map->l_tls_initimage,
|
map->l_tls_initimage_size), '\0',
|
||||||
map->l_tls_initimage_size);
|
map->l_tls_blocksize - map->l_tls_initimage_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
total += cnt;
|
total += cnt;
|
||||||
|
|
Loading…
Reference in New Issue