amd64: Allocate TCB with alignment of 16 rather than 8.

This matches the TLS_TCB_ALIGN definition in libc.

Reviewed by:	kib, jrtc27
Sponsored by:	The University of Cambridge, Google Inc.
Differential Revision:	https://reviews.freebsd.org/D33349
This commit is contained in:
John Baldwin 2021-12-09 13:16:45 -08:00
parent 9952b82b39
commit 299617496c

View File

@ -530,7 +530,7 @@ allocate_initial_tls(Obj_Entry *objs)
*/
tls_static_space = tls_last_offset + RTLD_STATIC_TLS_EXTRA;
addr = allocate_tls(objs, 0, 3 * sizeof(Elf_Addr), sizeof(Elf_Addr));
addr = allocate_tls(objs, 0, 3 * sizeof(Elf_Addr), 16);
if (__getosreldate() >= P_OSREL_WRFSBASE &&
(cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0)
wrfsbase((uintptr_t)addr);