From 320faf8e68796bcea316accdfa75c1f64a73f6b7 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 17 Apr 2014 07:57:09 +0200 Subject: score: Clarify TLS support --- doc/cpu_supplement/general.t | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/cpu_supplement/general.t b/doc/cpu_supplement/general.t index 9c952a7e97..173f84fcc9 100644 --- a/doc/cpu_supplement/general.t +++ b/doc/cpu_supplement/general.t @@ -319,7 +319,26 @@ operations of the default CPU specific fatal error handler. 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. +@code{_CPU_Context_Initialize()} function. There are support functions available +via @code{#include } which implement Variants I and II +according to Ulrich Drepper, @cite{ELF Handling For Thread-Local Storage}. + +@table @code + +@item _TLS_TCB_at_area_begin_initialize() +Uses Variant I, TLS offsets emitted by linker takes the TCB into account. For +a reference implementation see @file{cpukit/score/cpu/arm/cpu.c}. + +@item _TLS_TCB_before_TLS_block_initialize() +Uses Variant I, TLS offsets emitted by linker neglects the TCB. For a +reference implementation see +@file{c/src/lib/libcpu/powerpc/new-exceptions/cpu.c}. + +@item _TLS_TCB_after_TLS_block_initialize() +Uses Variant II. For a reference implementation see +@file{cpukit/score/cpu/sparc/cpu.c}. + +@end table The board support package (BSP) must provide the following sections and symbols in its linker command file: -- cgit v1.2.3