From dbb3988ee629d5fb7693b8dcf45d4cb1df848ab0 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 21 Sep 2016 15:43:37 +0300 Subject: [PATCH] net: Remove nbr_data section as it is useless No need to store the nbr pool data into a dedicated section as we have only one nbr pool defined. Change-Id: I6f2afcce57b5f588878496bf085567b938e32c80 Signed-off-by: Jukka Rissanen --- include/linker/common-ram.ld | 8 -------- net/yaip/nbr.h | 3 +-- scripts/sanitycheck | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/include/linker/common-ram.ld b/include/linker/common-ram.ld index ac500b75ab9..cf6ce03836d 100644 --- a/include/linker/common-ram.ld +++ b/include/linker/common-ram.ld @@ -180,11 +180,3 @@ KEEP(*(SORT_BY_NAME(".net_l2.data*"))) __net_l2_data_end = .; } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) - - SECTION_DATA_PROLOGUE(net_nbr, (OPTIONAL),) - { - __net_nbr_start = .; - *(".net_nbr.*") - KEEP(*(SORT_BY_NAME(".net_nbr*"))) - __net_nbr_end = .; - } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) diff --git a/net/yaip/nbr.h b/net/yaip/nbr.h index 3b693680695..353b60c21ce 100644 --- a/net/yaip/nbr.h +++ b/net/yaip/nbr.h @@ -109,8 +109,7 @@ struct net_nbr_table { #define NET_NBR_TABLE_INIT(_type, _name, _pool, _clear) \ _type struct net_nbr_table_##_name { \ struct net_nbr_table table; \ - } net_##_name __used \ - __attribute__((__section__(".net_nbr.data"))) = { \ + } net_##_name __used = { \ .table = { \ .clear = _clear, \ .nbr = (struct net_nbr *)_pool, \ diff --git a/scripts/sanitycheck b/scripts/sanitycheck index 2cc4c33cd19..78419e90a8c 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck @@ -464,7 +464,7 @@ class SizeCalculator: "_k_sem_area", "_k_mutex_area", "_k_alert_area", "_k_fifo_area", "_k_lifo_area", "_k_stack_area", "_k_msgq_area", "_k_mbox_area", "_k_pipe_area", - "net_if", "net_l2_data", "net_nbr"] + "net_if", "net_l2_data"] # These get copied into RAM only on non-XIP ro_sections = ["text", "ctors", "init_array", "reset", "rodata", "devconfig", "net_l2"]