SPRAB89A September 2011 – March 2014
Objects that are used to build initially-loaded modules can use this access model. Modules that use this access model cannot be dlopened.
Since the module will always be
initially loaded and the dynamic loader can allocate TLS blocks from initial modules
consecutively after the executable’s TLS block, the offset from the thread pointer
is known at dynamic link time. The thread-local variable can be accessed using
*(TP + offset)
, where the offset is loaded from the GOT to
ensure PIC and symbol preemption. Modules built with this type of addressing cannot
be dlopened. Such modules are marked with the dynamic flag DF_STATIC_TLS, and the
dynamic loader will refuse to dlopen modules marked DF_STATIC_TLS.