From c49e63e62c8a9fdced5cfaca2d01b1faec82f954 Mon Sep 17 00:00:00 2001 From: Travis Geiselbrecht Date: Thu, 27 May 2021 03:14:29 -0700 Subject: [PATCH] [app] make APP_START work with C++ Needs a __USED tag or the compiler will GC it apparently. Should do the same thing for other section based trickery. --- app/include/app.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/include/app.h b/app/include/app.h index 19ac3b2e..aee01f53 100644 --- a/app/include/app.h +++ b/app/include/app.h @@ -40,7 +40,7 @@ struct app_descriptor { size_t stack_size; }; -#define APP_START(appname) const struct app_descriptor _app_##appname __ALIGNED(sizeof(void *)) __SECTION("apps") = { .name = #appname, +#define APP_START(appname) const struct app_descriptor _app_##appname __USED __ALIGNED(sizeof(void *)) __SECTION("apps") = { .name = #appname, #define APP_END };