toolchain: migrate iterable sections calls to the external API

This migrates all the current iterable section usages to the external
API, dropping the "Z_" prefix:

Z_ITERABLE_SECTION_ROM
Z_ITERABLE_SECTION_ROM_GC_ALLOWED
Z_ITERABLE_SECTION_RAM
Z_ITERABLE_SECTION_RAM_GC_ALLOWED
Z_STRUCT_SECTION_ITERABLE
Z_STRUCT_SECTION_ITERABLE_ALTERNATE
Z_STRUCT_SECTION_FOREACH

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2021-08-04 23:05:54 +01:00 committed by Christopher Friedt
commit f88a420d69
54 changed files with 188 additions and 190 deletions

View file

@ -3,10 +3,10 @@
#if defined(CONFIG_NETWORKING)
#ifndef NETWORK_RAM_SECTIONS
#define NETWORK_RAM_SECTIONS \
Z_ITERABLE_SECTION_RAM(net_if, 4) \
Z_ITERABLE_SECTION_RAM(net_if_dev, 4) \
Z_ITERABLE_SECTION_RAM(net_l2, 4) \
Z_ITERABLE_SECTION_RAM(eth_bridge, 4)
ITERABLE_SECTION_RAM(net_if, 4) \
ITERABLE_SECTION_RAM(net_if_dev, 4) \
ITERABLE_SECTION_RAM(net_l2, 4) \
ITERABLE_SECTION_RAM(eth_bridge, 4)
#endif
#endif /* NETWORKING */
@ -53,7 +53,7 @@
__log_dynamic_end = .;
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
Z_ITERABLE_SECTION_RAM(_static_thread_data, 4)
ITERABLE_SECTION_RAM(_static_thread_data, 4)
#ifdef CONFIG_USERSPACE
/* All kernel objects within are assumed to be either completely
@ -66,18 +66,18 @@
_static_kernel_objects_begin = .;
#endif /* CONFIG_USERSPACE */
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_timer, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_slab, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_pool, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_heap, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mutex, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_stack, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_msgq, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mbox, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_pipe, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_sem, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_queue, 4)
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_condvar, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_timer, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_slab, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_pool, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_heap, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_mutex, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_stack, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_msgq, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_mbox, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_pipe, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_sem, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_queue, 4)
ITERABLE_SECTION_RAM_GC_ALLOWED(k_condvar, 4)
SECTION_DATA_PROLOGUE(_net_buf_pool_area,,SUBALIGN(4))
{

View file

@ -91,7 +91,7 @@
/* Build-time assignment of permissions to kernel objects to
* threads declared with K_THREAD_DEFINE()
*/
Z_ITERABLE_SECTION_ROM(z_object_assignment, 4)
ITERABLE_SECTION_ROM(z_object_assignment, 4)
#endif
SECTION_DATA_PROLOGUE(app_shmem_regions,,)
@ -102,53 +102,53 @@
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
#if defined(CONFIG_NET_SOCKETS)
Z_ITERABLE_SECTION_ROM(net_socket_register, 4)
ITERABLE_SECTION_ROM(net_socket_register, 4)
#endif
#if defined(CONFIG_NET_L2_PPP)
Z_ITERABLE_SECTION_ROM(ppp_protocol_handler, 4)
ITERABLE_SECTION_ROM(ppp_protocol_handler, 4)
#endif
Z_ITERABLE_SECTION_ROM(bt_l2cap_fixed_chan, 4)
ITERABLE_SECTION_ROM(bt_l2cap_fixed_chan, 4)
#if defined(CONFIG_BT_BREDR)
Z_ITERABLE_SECTION_ROM(bt_l2cap_br_fixed_chan, 4)
ITERABLE_SECTION_ROM(bt_l2cap_br_fixed_chan, 4)
#endif
#if defined(CONFIG_BT_CONN)
Z_ITERABLE_SECTION_ROM(bt_conn_cb, 4)
ITERABLE_SECTION_ROM(bt_conn_cb, 4)
#endif
Z_ITERABLE_SECTION_ROM(bt_gatt_service_static, 4)
ITERABLE_SECTION_ROM(bt_gatt_service_static, 4)
#if defined(CONFIG_BT_MESH)
Z_ITERABLE_SECTION_ROM(bt_mesh_subnet_cb, 4)
Z_ITERABLE_SECTION_ROM(bt_mesh_app_key_cb, 4)
ITERABLE_SECTION_ROM(bt_mesh_subnet_cb, 4)
ITERABLE_SECTION_ROM(bt_mesh_app_key_cb, 4)
Z_ITERABLE_SECTION_ROM(bt_mesh_hb_cb, 4)
ITERABLE_SECTION_ROM(bt_mesh_hb_cb, 4)
#endif
#if defined(CONFIG_BT_MESH_FRIEND)
Z_ITERABLE_SECTION_ROM(bt_mesh_friend_cb, 4)
ITERABLE_SECTION_ROM(bt_mesh_friend_cb, 4)
#endif
#if defined(CONFIG_BT_MESH_LOW_POWER)
Z_ITERABLE_SECTION_ROM(bt_mesh_lpn_cb, 4)
ITERABLE_SECTION_ROM(bt_mesh_lpn_cb, 4)
#endif
#if defined(CONFIG_BT_MESH_GATT_PROXY)
Z_ITERABLE_SECTION_ROM(bt_mesh_proxy_cb, 4)
ITERABLE_SECTION_ROM(bt_mesh_proxy_cb, 4)
#endif
#if defined(CONFIG_EC_HOST_CMD)
Z_ITERABLE_SECTION_ROM(ec_host_cmd_handler, 4)
ITERABLE_SECTION_ROM(ec_host_cmd_handler, 4)
#endif
#if defined(CONFIG_SETTINGS)
Z_ITERABLE_SECTION_ROM(settings_handler_static, 4)
ITERABLE_SECTION_ROM(settings_handler_static, 4)
#endif
Z_ITERABLE_SECTION_ROM(k_p4wq_initparam, 4)
ITERABLE_SECTION_ROM(k_p4wq_initparam, 4)
#if defined(CONFIG_EMUL)
SECTION_DATA_PROLOGUE(emulators_section,,)
@ -160,7 +160,7 @@
#endif /* CONFIG_EMUL */
#if defined(CONFIG_DNS_SD)
Z_ITERABLE_SECTION_ROM(dns_sd_rec, 4)
ITERABLE_SECTION_ROM(dns_sd_rec, 4)
#endif
#if defined(CONFIG_PCIE)
@ -193,7 +193,7 @@
__log_backends_end = .;
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
Z_ITERABLE_SECTION_ROM(shell, 4)
ITERABLE_SECTION_ROM(shell, 4)
SECTION_DATA_PROLOGUE(shell_root_cmds_sections,,)
{
@ -209,7 +209,7 @@
__font_entry_end = .;
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
Z_ITERABLE_SECTION_ROM(tracing_backend, 4)
ITERABLE_SECTION_ROM(tracing_backend, 4)
SECTION_DATA_PROLOGUE(zephyr_dbg_info,,)
{