Age | Commit message (Collapse) | Author |
|
Preparing for C++ support in TAs.
Moves the ELF headers (elf32.h, elf64.h, elf_common.h) from
ldelf/include to lib/libutee/include so that they may be used
by libutee to implement the dl_iterate_phdr() function. This will be
done 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>
|
|
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>
|
|
Adds the relocation type R_AARCH64_NONE.
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
|
The C preprocessor predefines __ASSEMBLER__ with value 1 when when
preprocessing assembly language, see [1]. Instead of using a special
defines, let's use the define already provided.
Link: [1] https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
|
Adds ldelf which loads user mode TAs while in user mode. The TA ELF file is
loaded and relocated by ldelf before the TA can be executed.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
|
Moves ELF definition header to a common location for core and ldelf.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|