From bd3eeb0ca22fd9b10b8a8bb0eee64305bdc8fec5 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Thu, 30 Jan 2025 20:16:23 +0100 Subject: [PATCH] sw: bootrom: Prevent gcc from generating prologue Specifically, we do not want it to push anything to the stack (such as the frame pointer), because it is not yet set up. --- sw/bootrom/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/bootrom/main.c b/sw/bootrom/main.c index 1b7fff1..b989913 100644 --- a/sw/bootrom/main.c +++ b/sw/bootrom/main.c @@ -20,7 +20,7 @@ asm("_start:\ #define main() _start() #endif /* ifdef ENABLE_STACK */ -__attribute__((noreturn)) void main() { +__attribute__((noreturn, naked)) void main() { uint8_t state = 0; uint8_t c; uint8_t opcode;