Searched hist:c27907e1bc5a46f3f95e72f901d7b0dfa3fa577f (Results 1 – 2 of 2) sorted by relevance
| /optee_os/core/arch/arm/kernel/ |
| H A D | sub.mk | c27907e1bc5a46f3f95e72f901d7b0dfa3fa577f Wed Apr 18 08:03:22 UTC 2018 Jerome Forissier <jerome.forissier@linaro.org> core: arm32: add support for dynamically linked TAs
This commit adds support for 32-bit dynamically linked Trusted Applications. The config flag for this feature is CFG_TA_DYNLINK, default enabled.
Why do this? Several reasons:
1. Save space in the TA storage area. The OP-TEE core libraries (libutee, libutils, libmpa) could very well be provided as shared objects (.so) rather than archive files (.a). They would be installed only once in the TA storage, instead of being duplicated inside each TA. 2. Allow upgrade of some libraries without re-linking the TAs. 3. Pave the way to sharing code pages between TAs, thus potentially reducing the memory footprint of the TEE.
The ELF loader is updated as follows:
- Locate the dynamic section in the program headers (PT_DYNAMIC entry). - Find the required external libraries by looking for DT_NEEDED entries in the dynamic section. Libraries are .so files signed like TAs and identified by a UUID so that the TA stores can be re-used. Using a UUID is also more flexible, because a new versions of a library may keep the same UUID or use another one. - Load all the libraries. - Process the dynamic relocations of type R_ARM_GLOB_DAT and R_ARM_JUMP_SLOT by resolving symbols by name, in breadth first order. - Map the library code and data into the user VA space.
The stack unwinding code will be updated in a later commit. As a result only the main executable may be unwound ; stack dumps will stop if the call stack goes inside a shared library.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960 32/64) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
|
| /optee_os/mk/ |
| H A D | config.mk | c27907e1bc5a46f3f95e72f901d7b0dfa3fa577f Wed Apr 18 08:03:22 UTC 2018 Jerome Forissier <jerome.forissier@linaro.org> core: arm32: add support for dynamically linked TAs
This commit adds support for 32-bit dynamically linked Trusted Applications. The config flag for this feature is CFG_TA_DYNLINK, default enabled.
Why do this? Several reasons:
1. Save space in the TA storage area. The OP-TEE core libraries (libutee, libutils, libmpa) could very well be provided as shared objects (.so) rather than archive files (.a). They would be installed only once in the TA storage, instead of being duplicated inside each TA. 2. Allow upgrade of some libraries without re-linking the TAs. 3. Pave the way to sharing code pages between TAs, thus potentially reducing the memory footprint of the TEE.
The ELF loader is updated as follows:
- Locate the dynamic section in the program headers (PT_DYNAMIC entry). - Find the required external libraries by looking for DT_NEEDED entries in the dynamic section. Libraries are .so files signed like TAs and identified by a UUID so that the TA stores can be re-used. Using a UUID is also more flexible, because a new versions of a library may keep the same UUID or use another one. - Load all the libraries. - Process the dynamic relocations of type R_ARM_GLOB_DAT and R_ARM_JUMP_SLOT by resolving symbols by name, in breadth first order. - Map the library code and data into the user VA space.
The stack unwinding code will be updated in a later commit. As a result only the main executable may be unwound ; stack dumps will stop if the call stack goes inside a shared library.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960 32/64) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
|