Searched hist:cf830b2b674ccc672d0124425714da7cae27c303 (Results 1 – 1 of 1) sorted by relevance
| /optee_os/ldelf/ |
| H A D | ta_elf_rel.c | cf830b2b674ccc672d0124425714da7cae27c303 Tue Jul 21 08:54:55 UTC 2020 Jerome Forissier <jerome@forissier.org> ldelf: add support for weak symbols
Preparing for C++ support in TAs.
When ldelf performs a symbol lookup in a TA, it currently considers only global symbols that are not undefined. It turns out that g++ can generates dynamic relocations referencing symbols that are weak and undefined [1], in other words: weak declarations. Those should end up resolving to zero.
This commit updates the symbol resolution to first look for global defined symbols, then weak defined, then weak undefined.
[1] __pthread_key_create, pthread_mutex_lock, pthread_mutex_unlock, __gnu_Unwind_Find_exidx.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|