aboutsummaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorTamas Ban <tamas.ban@arm.com>2020-10-26 13:03:13 +0000
committerTamas Ban <tamas.ban@arm.com>2020-12-17 13:06:19 +0000
commitf8b0b2df5e9b954fd5d59ae95684659e73b38c8c (patch)
treed76ac5d0545608363ba59aca869bdd6f188357b0 /bl2
parent73946a89d4e1b839878f0599516dc5ae6e01efe7 (diff)
downloadtrusted-firmware-m-f8b0b2df5e9b954fd5d59ae95684659e73b38c8c.tar.gz
Build: Enable code sharing between bootloader and SPE
Add CMake functions to allow sharing regions of code between independently linked binaries. Signed-off-by: Tamas Ban <tamas.ban@arm.com> Change-Id: I6a6132d6c1558b242d8da1dedab14f93a852f81a
Diffstat (limited to 'bl2')
-rw-r--r--bl2/CMakeLists.txt6
-rw-r--r--bl2/src/shared_symbol_template.txt25
2 files changed, 31 insertions, 0 deletions
diff --git a/bl2/CMakeLists.txt b/bl2/CMakeLists.txt
index 1496a1931..42cd65fb6 100644
--- a/bl2/CMakeLists.txt
+++ b/bl2/CMakeLists.txt
@@ -100,3 +100,9 @@ target_link_libraries(bl2_mbedcrypto
PUBLIC
bl2_mbedcrypto_config
)
+
+############################### CODE SHARING ###################################
+
+if (TFM_CODE_SHARING)
+ compiler_create_shared_code(bl2 ${CMAKE_CURRENT_SOURCE_DIR}/src/shared_symbol_template.txt)
+endif()
diff --git a/bl2/src/shared_symbol_template.txt b/bl2/src/shared_symbol_template.txt
new file mode 100644
index 000000000..65e305a4b
--- /dev/null
+++ b/bl2/src/shared_symbol_template.txt
@@ -0,0 +1,25 @@
+# -----------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# -----------------------------------------------------------
+mbedtls_internal
+mbedtls_sha256
+mbedtls_rsa
+mpi
+mbedtls_mpi_write_binary
+mbedtls_asn1_get_len
+mbedtls_asn1_get_tag
+mbedtls_mpi_bitlen
+mbedtls_cmp_abs
+mbedtls_cmp_int
+mbedtls_cmp_mpi
+mbedtls_mpi_get_bit
+mbedtls_mpi_init
+mbedtls_mpi_size
+mbedtls_aes_free
+mbedtls_aes_init
+mbedtls_entropy_free
+mbedtls_ctr_drbg_free
+mbedtls_mpi_cmp_mpi