toolchain.h: intoduce __kernel macros

In CONFIG_APPLICATION_MEMORY scenarios, these force
objects to be in kernel memory space.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-07-14 08:49:58 -07:00 committed by Andrew Boie
parent 2cb03c5cd6
commit 7ce3a79d80

View file

@ -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