K 10 svn:author V 4 mmel K 8 svn:date V 27 2017-12-12T11:25:30.658898Z K 7 svn:log V 890 Rework alignment handling in __libc_allocate_tls() for Variant I of TLS layout. There are two versions of variant I of TLS - ARM and aarch64 uses original version of variant I here TP points to start of TCB followed by aligned TLS segment. Both TCB and TLS must be aligned to alignment of TLS section. The TCB[0] points to DTV vector and DTV values are real addresses (without bias). - MIPS, PowerPC and RISC-V use modified version of variant I, where TP points (with bias) to TLS and TCB immediately precedes TLS without any alignment gap. Only TLS should be aligned. The TCB[0] points to DTV vector and DTV values are biased by constant value (0x8000) from real addresses. Take all this in account when allocating memory for TLS structures. MFC after: 1 month Reviewed by: kib, mizhka Tested by: mizhka(on mips) Differential Revision: https://reviews.freebsd.org/D13378 END