RISC-V: Fix an alignment warning in libthrCompiling with clang gives a loss-of-alignment error due the cast touint8_t *. Since the TLS is always tcb aligned and TP_OFFSET is definedas sizeof(stru
RISC-V: Fix an alignment warning in libthrCompiling with clang gives a loss-of-alignment error due the cast touint8_t *. Since the TLS is always tcb aligned and TP_OFFSET is definedas sizeof(struct tcb) we can guarantee there is no misalignment. Silencethe error by moving the offset into the inline assembly.Reviewed by: brMFC after: 1 weekDifferential Revision: https://reviews.freebsd.org/D21926
show more ...
Fix initial exec TLS mode for dynamically loaded shared objects.If dso uses initial exec TLS mode, rtld tries to allocate TLS instatic space. If there is no space left, the dlopen(3) fails. If spa
Fix initial exec TLS mode for dynamically loaded shared objects.If dso uses initial exec TLS mode, rtld tries to allocate TLS instatic space. If there is no space left, the dlopen(3) fails. If spaceif allocated, initial content from PT_TLS segment is distributed toall threads' pcbs, which was missed and caused un-initialized TLSsegment for such dso after dlopen(3).The mode is auto-detected either due to the relocation used, or if theDF_STATIC_TLS dynamic flag is set. In the later case, the TLS segmentis tried to allocate earlier, which increases chance of the dlopen(3)to succeed. LLD was recently fixed to properly emit the flag, ld.bdfdid it always.Initial test by: dumbbellTested by: emaste (amd64), ian (arm)Tested by: Gerald Aryeetey <aryeeteygerald_rogers.com> (arm64)Sponsored by: The FreeBSD FoundationMFC after: 2 weeksDifferential revision: https://reviews.freebsd.org/D19072
libthr: fix warnings at WARNS=6Fix more warnings about redundant declarations.Reviewed by: kib emasteMFC after: 3 daysSponsored by: Dell EMCDifferential Revision: https://reviews.freebsd.org/D
libthr: fix warnings at WARNS=6Fix more warnings about redundant declarations.Reviewed by: kib emasteMFC after: 3 daysSponsored by: Dell EMCDifferential Revision: https://reviews.freebsd.org/D10932
Unmagic the thread pointer offset.
Add pthread MD part for RISC-V.Reviewed by: andrewSponsored by: DARPA, AFRLSponsored by: HEIF5Differential Revision: https://reviews.freebsd.org/D5063