net: buf: Move net_buf_pool objects to dedicated linker area

Moving the net_buf_pool objects to a dedicated area lets us access
them by array offset into this area instead of directly by pointer.
This helps reduce the size of net_buf objects by 4 bytes.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-06-03 19:20:27 +03:00 committed by Johan Hedberg
commit 9703927f84
12 changed files with 105 additions and 41 deletions

View file

@ -130,6 +130,12 @@
_k_mem_pool_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
SECTION_DATA_PROLOGUE(_net_buf_pool_area, (OPTIONAL),)
{
_net_buf_pool_list = .;
KEEP(*(SORT_BY_NAME("._net_buf_pool.static.*")))
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
SECTION_DATA_PROLOGUE(net_if, (OPTIONAL),)
{
__net_if_start = .;