net: Declare a macro to define stacks used by networking

The macro defines the stack as usual, but if user has
enabled net shell (CONFIG_NET_SHELL), then additional
information about the stack is stored in net_shell
linker section. The information in the net_shell linker
section is then used to print information about the
stacks in the networking sub-system.

Change-Id: Ic6e9f16a73a192b9a59d32a6d0070322382f98bd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2016-11-18 15:10:08 +02:00
commit 8e84e36f14
5 changed files with 64 additions and 4 deletions

View file

@ -173,6 +173,16 @@
__net_if_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
#if defined(CONFIG_NET_SHELL)
SECTION_DATA_PROLOGUE(net_stack, (OPTIONAL),)
{
__net_stack_start = .;
*(".net_stack.*")
KEEP(*(SORT_BY_NAME(".net_stack*")))
__net_stack_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
#endif /* CONFIG_NET_SHELL */
SECTION_DATA_PROLOGUE(net_l2_data, (OPTIONAL),)
{
__net_l2_data_start = .;