diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-01-28 12:10:08 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-04 10:06:35 +0100 |
commit | 022851aba54d32831feaff13deb3d9943e130eee (patch) | |
tree | c1d6a8404dae393bd147790f6a9cf09c2f327b5a /doc/cpu_supplement/general.t | |
parent | bsps: Thread-local storage (TLS) for linkcmds (diff) | |
download | rtems-022851aba54d32831feaff13deb3d9943e130eee.tar.bz2 |
Add thread-local storage (TLS) support
Tested and implemented on ARM, m68k, PowerPC and SPARC. Other
architectures need more work.
Diffstat (limited to 'doc/cpu_supplement/general.t')
-rw-r--r-- | doc/cpu_supplement/general.t | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/cpu_supplement/general.t b/doc/cpu_supplement/general.t index 3a36843b59..cf28eefd63 100644 --- a/doc/cpu_supplement/general.t +++ b/doc/cpu_supplement/general.t @@ -314,6 +314,33 @@ interrupts and halts the processor. In each of the architecture specific chapters, this describes the precise operations of the default CPU specific fatal error handler. +@section Thread-Local Storage + +In order to support thread-local storage (TLS) the CPU port must implement the +facilities mandated by the application binary interface (ABI) of the CPU +architecture. The CPU port must initialize the TLS area in the +@code{_CPU_Context_Initialize} function. + +The board support package (BSP) must provide the following sections and symbols +in its linker command file: + +@example +.tdata : @{ + _TLS_Data_begin = .; + *(.tdata .tdata.* .gnu.linkonce.td.*) + _TLS_Data_end = .; +@} +.tbss : @{ + _TLS_BSS_begin = .; + *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) + _TLS_BSS_end = .; +@} +_TLS_Data_size = _TLS_Data_end - _TLS_Data_begin; +_TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin; +_TLS_Size = _TLS_BSS_end - _TLS_Data_begin; +_TLS_Alignment = ALIGNOF (.tdata); +@end example + @c @c @c |