freebsd-skq/lib/libc/aarch64
kib 9638d3e2e6 Fix initial exec TLS mode for dynamically loaded shared objects.
If dso uses initial exec TLS mode, rtld tries to allocate TLS in
static space. If there is no space left, the dlopen(3) fails. If space
if allocated, initial content from PT_TLS segment is distributed to
all threads' pcbs, which was missed and caused un-initialized TLS
segment for such dso after dlopen(3).

The mode is auto-detected either due to the relocation used, or if the
DF_STATIC_TLS dynamic flag is set.  In the later case, the TLS segment
is tried to allocate earlier, which increases chance of the dlopen(3)
to succeed.  LLD was recently fixed to properly emit the flag, ld.bdf
did it always.

Initial test by:	dumbbell
Tested by:	emaste (amd64), ian (arm)
Tested by:	Gerald Aryeetey <aryeeteygerald_rogers.com> (arm64)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D19072
2019-03-29 17:52:57 +00:00
..
gen Decrease relative branch brittleness. 2017-06-20 07:25:38 +00:00
string
sys Remove architecture specific shmat.S files. 2018-04-05 18:17:46 +00:00
_fpmath.h
arith.h
gd_qnan.h
Makefile.inc Correct an misunderstanding of MDSRCS. 2017-03-02 17:07:28 +00:00
static_tls.h Fix initial exec TLS mode for dynamically loaded shared objects. 2019-03-29 17:52:57 +00:00
Symbol.map Don't export _end on arm64 and riscv. 2018-06-01 23:42:10 +00:00
SYS.h Do not use b.cs instruction to jump to cerror. 2017-04-07 22:58:20 +00:00