SPRAB89A September 2011 – March 2014
In the case of bare-metal dynamic linking systems, the dynamic loader is responsible for creating the main thread’s TLS block. The dynamic loader when loading an ELF File should load the PT_TLS segment and should provide a way for the thread library to access the PT_TLS Initialization Image so the thread library can use it to initialize the TLS blocks for the threads it creates. The static linker when building a dynamic executable/library generates the PT_TLS segment as per ELF requirements.
Each dynamic module (executable or shared object or dynamic library) gets its own TLS block. The PT_TLS segment contains the initial values for the TLS objects that are defined in a given module.