diff --git a/include/toolchain/gcc.h b/include/toolchain/gcc.h index d62a611639..349051329d 100644 --- a/include/toolchain/gcc.h +++ b/include/toolchain/gcc.h @@ -71,6 +71,16 @@ do { \ #define __in_section_unique(seg) ___in_section(seg, __FILE__, __COUNTER__) +#ifdef CONFIG_APPLICATION_MEMORY +#define __kernel __in_section_unique(kernel) +#define __kernel_noinit __in_section_unique(kernel_noinit) +#define __kernel_bss __in_section_unique(kernel_bss) +#else +#define __kernel +#define __kernel_noinit __noinit +#define __kernel_bss +#endif + #ifndef __packed #define __packed __attribute__((__packed__)) #endif