linker-defs: add output section routing macros

This is conditionally defined based on whether we are splitting
the application from the kernel, and is used for specifying
kernel input sections based on input files.

The kernel output sections will get matching input sections only
in libzephyr.a and kernel/lib.a.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-06-19 10:20:41 -07:00 committed by Anas Nashif
commit f1ae5d40b4

View file

@ -101,6 +101,14 @@
KEEP(*(".shell_*")); \ KEEP(*(".shell_*")); \
__shell_cmd_end = .; __shell_cmd_end = .;
#ifdef CONFIG_APPLICATION_MEMORY
#define KERNEL_INPUT_SECTION(sect) libzephyr.a (sect) kernel/lib.a (sect)
#define APP_INPUT_SECTION(sect) EXCLUDE_FILE (*libzephyr.a *kernel/lib.a) *(sect)
#else
#define KERNEL_INPUT_SECTION(sect) *(sect)
#define APP_INPUT_SECTION(sect) *(sect)
#endif
#ifdef CONFIG_X86 /* LINKER FILES: defines used by linker script */ #ifdef CONFIG_X86 /* LINKER FILES: defines used by linker script */
/* Should be moved to linker-common-defs.h */ /* Should be moved to linker-common-defs.h */