HomeFreeBSD

rtld: do not allow both dynamic DTV index and static TLS offset

Description

rtld: do not allow both dynamic DTV index and static TLS offset

If we are allocating static offset for an object with dynamic index,
return failure. In the opposite case, if dynamic index is requested for
statically allocated TLS area, directly use the offset instead of
setting the index.

Taken from NetBSD Joerg Sonnenberger change for src/libexec/ld.elf_so/tls.c
rev. 1.18.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on Jun 5 2023, 12:54 AM
Parents
rG283a4f409731: rtld: rename tls_done to tls_static
Branches
Unknown
Tags
Unknown