Skip to content

Use initial-exec TLS for glibc and FreeBSD only, auto-enable TLSDESC

Alex requested to merge alxu/libglvnd:tls-portability into master

It is not portable to use initial-exec TLS in dlopened libraries. glibc and FreeBSD allocate extra memory for extra initial-exec variables specifically for libGL, but other libcs including musl do not.

Since TLS entry asm assumes IE TLS, disable it otherwise.

TLSDESC speeds up access to global-dynamic TLS. Entry asm does not support TLSDESC, but all accesses are to initial-exec symbols anyways, so it is not necessary to handle that separately.

Edited by Alex

Merge request reports

Loading