Redo the calculation of the alignment and placement of static TLS data to
authorguenther <guenther@openbsd.org>
Fri, 1 Dec 2017 23:30:05 +0000 (23:30 +0000)
committerguenther <guenther@openbsd.org>
Fri, 1 Dec 2017 23:30:05 +0000 (23:30 +0000)
commitf54aa4647fbcdf3cdb61745d141e42ecec60a7ae
treecc9fb98e826563dcb4024e6bacd68ee724da2d4c
parent2f8859da96b8bfd096efcc4a70940a891b5d41a8
Redo the calculation of the alignment and placement of static TLS data to
correctly take into account the segment p_align.  Previously, anything
with a size belong the natural alignment or with alignment larger than
the natural one would either not be intialized correctly, be misaligned,
or result in the TIB being misaligned.

Problems reported by Charles Collicutt (charles (at) collicutt.co.uk)
ok kettenis@
lib/libc/dlfcn/init.c
lib/libc/dlfcn/tib.c
lib/libc/hidden/tib.h
libexec/ld.so/malloc.c
libexec/ld.so/tib.c
libexec/ld.so/util.h