Home
last modified time | relevance | path

Searched hist:fe6849487f7845d474828af162ddd882cbd3bb99 (Results 1 – 3 of 3) sorted by relevance

/optee_os/ldelf/
H A Dta_elf.hfe6849487f7845d474828af162ddd882cbd3bb99 Tue Jul 21 08:54:59 UTC 2020 Jerome Forissier <jerome@forissier.org> ldelf: arm64: support R_AARCH64_TLS_TPREL relocations

Preparing for C++ support in TAs.

This commit adds support for relocation type R_AARCH64_TLS_TPREL.
Although OP-TEE does not support multi-threaded TAs, introducing basic
support for multi-threading will allow binaries generated by the
aarch64-linux-gnueabihf-g++ compiler to work properly. Indeed, this
compiler is configured for a multi-threadded environment by default.

The way R_AARCH64_TLS_TPREL works is simple: the runtime library needs
to keep a per-thread copy of all the TLS segments in the application.
When the compiler needs to access a thread-specific symbol, it emits
this relocation. The loader will then replace the value by the offset
of the desired symbol in the Thread Control Block of the current thread
(the address of the TCB is obtained via the TPIDR_EL0 register).

The runtime code that sets up the TCB from the TLS segments will come
in a later commit.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
H A Dta_elf_rel.cfe6849487f7845d474828af162ddd882cbd3bb99 Tue Jul 21 08:54:59 UTC 2020 Jerome Forissier <jerome@forissier.org> ldelf: arm64: support R_AARCH64_TLS_TPREL relocations

Preparing for C++ support in TAs.

This commit adds support for relocation type R_AARCH64_TLS_TPREL.
Although OP-TEE does not support multi-threaded TAs, introducing basic
support for multi-threading will allow binaries generated by the
aarch64-linux-gnueabihf-g++ compiler to work properly. Indeed, this
compiler is configured for a multi-threadded environment by default.

The way R_AARCH64_TLS_TPREL works is simple: the runtime library needs
to keep a per-thread copy of all the TLS segments in the application.
When the compiler needs to access a thread-specific symbol, it emits
this relocation. The loader will then replace the value by the offset
of the desired symbol in the Thread Control Block of the current thread
(the address of the TCB is obtained via the TPIDR_EL0 register).

The runtime code that sets up the TCB from the TLS segments will come
in a later commit.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
H A Dta_elf.cfe6849487f7845d474828af162ddd882cbd3bb99 Tue Jul 21 08:54:59 UTC 2020 Jerome Forissier <jerome@forissier.org> ldelf: arm64: support R_AARCH64_TLS_TPREL relocations

Preparing for C++ support in TAs.

This commit adds support for relocation type R_AARCH64_TLS_TPREL.
Although OP-TEE does not support multi-threaded TAs, introducing basic
support for multi-threading will allow binaries generated by the
aarch64-linux-gnueabihf-g++ compiler to work properly. Indeed, this
compiler is configured for a multi-threadded environment by default.

The way R_AARCH64_TLS_TPREL works is simple: the runtime library needs
to keep a per-thread copy of all the TLS segments in the application.
When the compiler needs to access a thread-specific symbol, it emits
this relocation. The loader will then replace the value by the offset
of the desired symbol in the Thread Control Block of the current thread
(the address of the TCB is obtained via the TPIDR_EL0 register).

The runtime code that sets up the TCB from the TLS segments will come
in a later commit.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>