commit | a263637dd3b30b528a867139a33aadac4c23cdc5 | [log] [tgz] |
---|---|---|
author | Jerome Forissier <jerome.forissier@linaro.org> | Fri Feb 10 11:04:10 2023 +0100 |
committer | Jérôme Forissier <jerome@forissier.org> | Tue Feb 14 08:04:32 2023 +0100 |
tree | b478f9d0c78d46b9765899007214b2e70b339dfb | |
parent | 5ddda749c60dce834bcd79e8b8d904858319adc0 [diff] |
libutils: add stubs for pthread functions When building with GCC 11.3.1 [1], the linker reports undefined symbols in the C++ test TA: $ make 2>&1 | grep -E "(in function|undefined reference)" | sed 's@.*/@@' libstdc++.a(eh_alloc.o): in function `(anonymous namespace)::pool::free(void*) [clone .constprop.0]': gthr-default.h:749: undefined reference to `pthread_mutex_lock' gthr-default.h:779: undefined reference to `pthread_mutex_unlock' libstdc++.a(eh_alloc.o): in function `(anonymous namespace)::pool::allocate(unsigned long) [clone .constprop.0]': gthr-default.h:749: undefined reference to `pthread_mutex_lock' gthr-default.h:779: undefined reference to `pthread_mutex_unlock' libgcc_eh.a(unwind-dw2-fde-dip.o): in function `__gthread_mutex_lock': gthr-default.h:749: undefined reference to `pthread_mutex_lock' libgcc_eh.a(unwind-dw2-fde-dip.o): in function `__gthread_mutex_unlock': gthr-default.h:779: undefined reference to `pthread_mutex_unlock' [more of the same follow] To fix that issue, introduce no-op stubs as weak symbols in libutils. Doing so is valid because TAs are single threaded and non-reentrant. Link: [1] https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Sumit Garg <sumit.garg@linaro.org>
This git contains source code for the secure side implementation of OP-TEE project.
All official OP-TEE documentation has moved to http://optee.readthedocs.io.
// OP-TEE core maintainers