* Nathan Sidwell: > On 6/25/20 2:34 PM, Joel Sherrill wrote: >> Hi >> >> RTEMS supports over 15 processor architectures and we would like to ensure >> that TLS is supported on all rather than just a handful of popular ones >> (arm, x86, powerpc, sparc, etc). I know of Ulrich Drepper's document ( >> https://www.akkadia.org/drepper/tls.pdf) but it is a few years old and >> covers only a subset of architectures. >> >> Is TLS supported on all architectures in GCC? >> >> Is there some documentation on how it is implemented on architectures not >> in Ulrich's paper? Or some guidance on how to extract this information from >> the GCC source? > > The ARM (32) abi has some extensions to that, which originally came from > Alex Oliva and then I implemented (The GNU2 TLS stuff). I think the > smarts is in the linker for that though.
There's a lot of complexity, created by lazy binding of TLS symbols, allocation of TLS data on first use (which simply crashes in low memory conditions), and support for dlopen (and dynamic linking in general). I'm not sure how much of that applies in the context of RTEMS.