refactor(core/embed): move __stack_chk_fail to a better location

[no changelog]
tychovrahe/coresplit/merged
cepetr 1 month ago
parent dafea51a0e
commit 2b19d83865

@ -38,6 +38,14 @@
#define COLOR_FATAL_ERROR COLOR_BLACK
#endif
uint32_t __stack_chk_guard = 0;
// Calls to this function are inserted by the compiler
// when stack protection is enabled.
void __attribute__((noreturn, used)) __stack_chk_fail(void) {
error_shutdown("(SS)");
}
void __attribute__((noreturn))
error_shutdown_ex(const char *title, const char *message, const char *footer) {
if (title == NULL) {

@ -36,12 +36,6 @@
#include "backlight_pwm.h"
#endif
uint32_t __stack_chk_guard = 0;
void __attribute__((noreturn)) __stack_chk_fail(void) {
error_shutdown("(SS)");
}
// reference RM0090 section 35.12.1 Figure 413
#define USB_OTG_HS_DATA_FIFO_RAM (USB_OTG_HS_PERIPH_BASE + 0x20000U)
#define USB_OTG_HS_DATA_FIFO_SIZE (4096U)

@ -32,12 +32,6 @@
#include "stm32u5xx_ll_utils.h"
uint32_t __stack_chk_guard = 0;
void __attribute__((noreturn)) __stack_chk_fail(void) {
error_shutdown("(SS)");
}
void invalidate_firmware(void) {
// on stm32u5, we need to disable the instruction cache before erasing the
// firmware - otherwise, the write check will fail

Loading…
Cancel
Save