CVSROOT:        /cvs
Module name:    src
Changes by:     rob...@cvs.openbsd.org  2021/11/12 03:08:35

Modified files:
        gnu/llvm/compiler-rt/lib/builtins: emutls.c 
        gnu/lib/libcxxabi: shlib_version 

Log message:
backport https://reviews.llvm.org/D107127 to fix shared libraries using emutls

Our emulated TLS implementation relies on local state (e.g. for the pthread
key), and if we duplicate this state across different shared libraries,
accesses to the same TLS variable from different shared libraries will yield
different results (see https://github.com/android/ndk/issues/1551 for an
example). __emutls_get_address is the only external entry point for emulated
TLS, and by making it default visibility and weak, we can rely on the dynamic
linker to coalesce multiple copies at runtime and ensure a single unique copy
of TLS state. This is a best effort;

Also bump the libc++abi minor because now it picks up the __emutls_get_address
symbol.

ok kettenis@

Reply via email to