diff mbox series

sandbox: Fix LTO to work with STACKPROTECTOR

Message ID 20240624092900.2108175-1-andrew.goodbody@linaro.org
State New
Headers show
Series sandbox: Fix LTO to work with STACKPROTECTOR | expand

Commit Message

Andrew Goodbody June 24, 2024, 9:29 a.m. UTC
Add the STACKPROTECTOR symbols to the script that generates the
symbols that should not be removed by the use of LTO when linking
a shared object. This prevents a fail to build due to link errors.

https://source.denx.de/u-boot/u-boot/-/issues/35

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
---

 scripts/gen_ll_addressable_symbols.sh | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/scripts/gen_ll_addressable_symbols.sh b/scripts/gen_ll_addressable_symbols.sh
index d0864804aa..ebf89b04bf 100755
--- a/scripts/gen_ll_addressable_symbols.sh
+++ b/scripts/gen_ll_addressable_symbols.sh
@@ -13,3 +13,5 @@  set -e
 echo '#include <common.h>'
 $@ 2>/dev/null | grep -oe '_u_boot_list_2_[a-zA-Z0-9_]*_2_[a-zA-Z0-9_]*' | \
 	sort -u | sed -e 's/^\(.*\)/extern char \1[];\n__ADDRESSABLE(\1);/'
+$@ 2>/dev/null | grep -oe '__stack_chk_.*' | \
+	sort -u | sed -e 's/^\(.*\)/extern char \1[];\n__ADDRESSABLE(\1);/'