From 3f2a7b9bfd030ebaa5a0c27c2896ccbfd6c095de Mon Sep 17 00:00:00 2001 From: Ilia Sergachev Date: Sun, 23 Jan 2022 11:04:22 +0100 Subject: [PATCH] software/bios: set attribute used on main to fix optimization in some configurations --- litex/soc/software/bios/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex/soc/software/bios/main.c b/litex/soc/software/bios/main.c index 56042538b..13ae2d6c2 100644 --- a/litex/soc/software/bios/main.c +++ b/litex/soc/software/bios/main.c @@ -74,7 +74,7 @@ static void boot_sequence(void) printf("No boot medium found\n"); } -int main(int i, char **c) +__attribute__((__used__)) int main(int i, char **c) { char buffer[CMD_LINE_BUFFER_SIZE]; char *params[MAX_PARAM];