SPRAB89A September 2011 – March 2014
Allocating the TLS region to be used by the thread-library is specific to the library. The specification does not dictate a specific way to do this. One possible way to allocate the TLS region is as follows:
.tls_region { . += 0x2000; } START(TLS_REGION_START) > RAM
The thread library can use the symbol TLS_REGION_START to locate the TLS region. A user might want to allocate TLS blocks for N number of threads, and it is useful to know the size of TLS block. The user can do the following:
.tls_region { . += MAX_THREADS * __TI_TLS_BLOCK_SIZE; } > RAM
The static linker defines the symbol __TI_TLS_BLOCK_SIZE and sets it to the size of the TLS block.