SPRAB89A September 2011 – March 2014
The ELF specification (www.sco.com/developers/gabi/) provides details on how thread-local storage is represented in ELF relocatable object files and ELF modules.
To summarize the relevant portions of the ELF specification, thread-local variables are represented in the object files and ELF modules similarly to static data. The difference is that ELF requires that thread-local variables be allocated in sections with the SHF_TLS flag set in relocatable files. Also, the ELF specification requires that the section names .tdata and .tbss be used for initialized and uninitialized thread-local storage, respectively. These sections have read-write permission.
In modules, ELF requires that the TLS segment have the PT_TLS segment type. This segment is read-only. The PT_TLS segment is the TLS Image.
Thread-local symbols have the symbol type STT_TLS.