diff options
Diffstat (limited to 'recipes-security/optee/optee-os/0001-libutils-provide-empty-__getauxval-implementation.patch')
-rw-r--r-- | recipes-security/optee/optee-os/0001-libutils-provide-empty-__getauxval-implementation.patch | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/recipes-security/optee/optee-os/0001-libutils-provide-empty-__getauxval-implementation.patch b/recipes-security/optee/optee-os/0001-libutils-provide-empty-__getauxval-implementation.patch deleted file mode 100644 index 0120f5c2..00000000 --- a/recipes-security/optee/optee-os/0001-libutils-provide-empty-__getauxval-implementation.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
3 | |||
4 | From 36e784f621bf5d5be9183beba35f39426277c110 Mon Sep 17 00:00:00 2001 | ||
5 | From: Volodymyr Babchuk <volodymyr_babchuk@epam.com> | ||
6 | Date: Tue, 13 Oct 2020 22:45:39 +0300 | ||
7 | Subject: [PATCH 1/3] libutils: provide empty __getauxval() implementation | ||
8 | |||
9 | Never version of libgcc are built with LSE implementation in mind. To | ||
10 | determine if LSE is available on platform it calls __getauxval(), so in | ||
11 | some cases we can get undefined reference to __getauxval() error. | ||
12 | |||
13 | Prominent case is libgcc_eh.a library, which is used by C++ TAs. Exception | ||
14 | handler depends on atomic operations, so it tries to call | ||
15 | init_have_lse_atomics() first. This function in turn calls __getauxval(), | ||
16 | which causes linking error. | ||
17 | |||
18 | In the future we can make __getauxval() to return actual platform | ||
19 | capabilities. | ||
20 | |||
21 | Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> | ||
22 | Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | ||
23 | Reviewed-by: Jerome Forissier <jerome@forissier.org> | ||
24 | --- | ||
25 | lib/libutils/ext/arch/arm/auxval.c | 12 ++++++++++++ | ||
26 | lib/libutils/ext/arch/arm/sub.mk | 1 + | ||
27 | 2 files changed, 13 insertions(+) | ||
28 | create mode 100644 lib/libutils/ext/arch/arm/auxval.c | ||
29 | |||
30 | diff --git a/lib/libutils/ext/arch/arm/auxval.c b/lib/libutils/ext/arch/arm/auxval.c | ||
31 | new file mode 100644 | ||
32 | index 00000000..98bca850 | ||
33 | --- /dev/null | ||
34 | +++ b/lib/libutils/ext/arch/arm/auxval.c | ||
35 | @@ -0,0 +1,12 @@ | ||
36 | +// SPDX-License-Identifier: BSD-2-Clause | ||
37 | +/* | ||
38 | + * Copyright (c) 2020, EPAM Systems | ||
39 | + */ | ||
40 | + | ||
41 | +#include <compiler.h> | ||
42 | + | ||
43 | +unsigned long int __getauxval (unsigned long int type); | ||
44 | +unsigned long int __getauxval (unsigned long int type __unused) | ||
45 | +{ | ||
46 | + return 0; | ||
47 | +} | ||
48 | diff --git a/lib/libutils/ext/arch/arm/sub.mk b/lib/libutils/ext/arch/arm/sub.mk | ||
49 | index dc5eed67..2e779066 100644 | ||
50 | --- a/lib/libutils/ext/arch/arm/sub.mk | ||
51 | +++ b/lib/libutils/ext/arch/arm/sub.mk | ||
52 | @@ -3,6 +3,7 @@ srcs-$(CFG_ARM32_$(sm)) += aeabi_unwind.c | ||
53 | endif | ||
54 | srcs-$(CFG_ARM32_$(sm)) += atomic_a32.S | ||
55 | srcs-$(CFG_ARM64_$(sm)) += atomic_a64.S | ||
56 | +srcs-y += auxval.c | ||
57 | ifneq ($(sm),ldelf) # TA, core | ||
58 | srcs-$(CFG_ARM32_$(sm)) += mcount_a32.S | ||
59 | srcs-$(CFG_ARM64_$(sm)) += mcount_a64.S | ||
60 | -- | ||
61 | 2.25.1 | ||
62 | |||