| #
7eaed3a3 |
| 23-Nov-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutils: prefix system header guard with 2 underscore chars
Adds prefix "__" to standard header files implemented in libutils. This is applicable as these header guards macro are system macros. Thi
libutils: prefix system header guard with 2 underscore chars
Adds prefix "__" to standard header files implemented in libutils. This is applicable as these header guards macro are system macros. This change prevents conflicts with external component as faced with SCP-firmware [1] that implements wrapper headers with #include_next for assert.h and stdlib.h using ASSERT_H [2] and STDLIB_H [3] as header guards as in libutils.
Prior this change did stdint.h both define STDINT_H and _STDINT_H but guards only upon STDINT_H. This change removes STDINT_H.
Link: [1] https://github.com/ARM-software/SCP-firmware.git Link: [2] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/assert.h#L8-L9 Link: [3] https://github.com/ARM-software/SCP-firmware/blob/v2.11.0/framework/include/stdlib.h#L8-L9 Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
b224894f |
| 21-Dec-2021 |
Sumit Garg <sumit.garg@linaro.org> |
libutils: provide __sprintf_chk implementation
While building optee_test CXX test-cases natively on aarch64, OP-TEE build relies on toolchain provided by buildroot. The buildroot toolchain is built
libutils: provide __sprintf_chk implementation
While building optee_test CXX test-cases natively on aarch64, OP-TEE build relies on toolchain provided by buildroot. The buildroot toolchain is built with flag: -fstack-protector-strong which requires __sprintf_chk symbol provided by standard glibc. For OP-TEE we use a customized libc which leads to below error:
... CC out/init.o CC out/os_test.o CC out/ta_entry.o CXX out/cxx_tests.o CC out/user_ta_header.o CPP out/ta.lds LD out/5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.elf /home/sumit/optee_br/build/../toolchains/aarch64/bin/aarch64-linux-ld.bfd: /home/sumit/optee_br/toolchains/aarch64/bin/../lib/gcc/aarch64-buildroot-linux-gnu/10.3.0/../../../../aarch64-buildroot-linux-gnu/lib/../lib64/libstdc++.a(cp-demangle.o): in function d_append_num': cp-demangle.c:(.text+0x830): undefined reference to __sprintf_chk' ...
Fix this issue by providing __sprintf_chk implementation.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
405a5072 |
| 21-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
libutils: add simplified fputc(), fputs(), fwrite(), write()
Preparing for C++ support in TAs.
Adds a few <stdio.h> functions to libutils:
fputc() fputs() fwrite() write()
The proposed implem
libutils: add simplified fputc(), fputs(), fwrite(), write()
Preparing for C++ support in TAs.
Adds a few <stdio.h> functions to libutils:
fputc() fputs() fwrite() write()
The proposed implementations are limited in the sense that they only accept writing to stdout or stderr. The output goes directly to the secure console and no difference is made between stdout and stderr.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
f35d131b |
| 21-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
libutils: add sprintf()
Preparing for C++ support in TAs.
Implement sprintf() in libutils.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linar
libutils: add sprintf()
Preparing for C++ support in TAs.
Implement sprintf() in libutils.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
dc0f4ec2 |
| 16-May-2018 |
Etienne Carriere <etienne.carriere@st.com> |
Remove license notice from STMicroelectronics files
Since a while the source files license info are defined by SPDX identifiers. We can safely remove the verbose license text from the files that are
Remove license notice from STMicroelectronics files
Since a while the source files license info are defined by SPDX identifiers. We can safely remove the verbose license text from the files that are owned by either only STMicroelectronics or only both Linaro and STMicroelectronics.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
1bb92983 |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] wa
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] was used to double check the license matching code in the Python script. All the licenses detected by scancode are either detected by spdxify.py, or have no SPDX identifier, or are false matches.
Link: [1] https://spdx.org/licenses/ Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Link: [3] https://github.com/nexB/scancode-toolkit Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
dc454609 |
| 17-Aug-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: provide an implementation of putchar()
Calling printf() from a TA to print a single character results in a linker error:
39 TEE_Result TA_CreateEntryPoint(void) 40 { 41 pr
libutee: provide an implementation of putchar()
Calling printf() from a TA to print a single character results in a linker error:
39 TEE_Result TA_CreateEntryPoint(void) 40 { 41 printf("."); 42 /* ... */ 43 }
hello_world_ta.o: In function `TA_CreateEntryPoint': hello_world_ta.c:41: undefined reference to `putchar'
In this case, the compiler has optimized the printf() call into a call to putchar(), assuming that we have a C library and that it complies to the relevant standards (so that printf() and putchar() may be used interchangeably).
One way to fix the issue is to prevent such optimizations by using -fno-builtin or -ffreestanding, at the cost of slightly larger code size and possibly reduced performance.
Another option is to simply provide the missing putchar() function. It is the purpose of this commit.
Reported-by: Zeng Tao <prime.zeng@hisilicon.com> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
b0104773 |
| 12-Jun-2014 |
Pascal Brand <pascal.brand@st.com> |
Open-source the TEE Core
Signed-off-by: Pascal Brand <pascal.brand@st.com>
|