You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've checked out the v2023.09 tag and attempted to build the mpfs-icicle-kit-es with the CC_STACKPROTECTOR_STRONG enabled. I am using the compiler provided by SoftConsole v2022.2, GCC 8.3.0.
~/hss$ riscv64-unknown-elf-gcc --version
riscv64-unknown-elf-gcc (xPack GNU RISC-V Embedded GCC (Microsemi SoftConsole build), 64-bit) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compile fails at linking.
LD hss-l2scratch.elf
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: application/crt.o: in function `.L0 ':
/home/jschmoller/hss/application/crt.S:30: undefined reference to `platform'
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /home/jschmoller/hss/application/crt.S:244: undefined reference to `HSS_U54_HandleIPI'
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: application/crt.o: in function `.checkIfHssIpi':
/home/jschmoller/hss/application/crt.S:254: undefined reference to `sbi_trap_handler'
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: application/crt.o: in function `.L0 ':
/home/jschmoller/hss/application/crt.S:110: undefined reference to `HSS_U54_Banner'
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: application/hart0/hss_main.o: in function `main':
/home/jschmoller/hss/application/hart0/hss_main.c:77: undefined reference to `HSS_Init'
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /home/jschmoller/hss/application/hart0/hss_main.c:80: undefined reference to `sbi_hart_hang'
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: application/hart0/hss_main.o: in function `hss_main':
/home/jschmoller/hss/application/hart0/hss_main.c:64: undefined reference to `HSS_Wdog_MonitorHart'
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /home/jschmoller/hss/application/hart0/hss_main.c:68: undefined reference to `spanOfPGlobalStateMachines'
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /home/jschmoller/hss/application/hart0/hss_main.c:68: undefined reference to `pGlobalStateMachines'
/home/jschmoller/SoftConsole-v2022.2-RISC-V-747/riscv-unknown-elf-gcc/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /home/jschmoller/hss/application/hart0/hss_main.c:68: undefined reference to `RunStateMachines'
collect2: error: ld returned 1 exit status
NM hss-l2scratch.sym
riscv64-unknown-elf-nm: 'Default/hss-l2scratch.elf': No such file
BIN hss-l2scratch.bin
riscv64-unknown-elf-objcopy: 'Default/hss-l2scratch.elf': No such file
make: *** [Makefile:124: hss-l2scratch.elf] Error 1
Anyone seen this before (and hopefully, know a solution)?
Hi.
Assuming that you are building for the Icicle kit or something similar and you enabled strong stack protection via Kconfig.
Also assuming that without this option enabled you are able to build without an issue
I tried the above and I also see same link time errors.
digging further you are enabling CONFIG_CC_STACKPROTECTOR_STRONG=y in .config, by default this is disabled.
looking at rules.mk there seems to be a known issue enabling the stack protector feature and having Link Time optimization enabled (flt0)
The environment is hardwired to version 8.3.0 of the tools, so no issue there.
will raise as a potential issue with the Support Team
Regards,
Dave
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've checked out the
v2023.09
tag and attempted to build thempfs-icicle-kit-es
with theCC_STACKPROTECTOR_STRONG
enabled. I am using the compiler provided by SoftConsole v2022.2, GCC 8.3.0.Compile fails at linking.
Anyone seen this before (and hopefully, know a solution)?
Beta Was this translation helpful? Give feedback.
All reactions