|
Zephyr API 3.6.99
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
7#ifndef INCLUDE_ZEPHYR_LINKER_ITERABLE_SECTIONS_H_
8#define INCLUDE_ZEPHYR_LINKER_ITERABLE_SECTIONS_H_
15#define Z_LINK_ITERABLE(struct_type) \
16 _CONCAT(_##struct_type, _list_start) = .; \
17 KEEP(*(SORT_BY_NAME(._##struct_type.static.*))); \
18 _CONCAT(_##struct_type, _list_end) = .
20#define Z_LINK_ITERABLE_NUMERIC(struct_type) \
21 _CONCAT(_##struct_type, _list_start) = .; \
22 KEEP(*(SORT(._##struct_type.static.*_?_*))); \
23 KEEP(*(SORT(._##struct_type.static.*_??_*))); \
24 _CONCAT(_##struct_type, _list_end) = .
26#define Z_LINK_ITERABLE_ALIGNED(struct_type, align) \
28 Z_LINK_ITERABLE(struct_type);
30#define Z_LINK_ITERABLE_GC_ALLOWED(struct_type) \
31 _CONCAT(_##struct_type, _list_start) = .; \
32 *(SORT_BY_NAME(._##struct_type.static.*)); \
33 _CONCAT(_##struct_type, _list_end) = .
35#define Z_LINK_ITERABLE_SUBALIGN CONFIG_LINKER_ITERABLE_SUBALIGN
51#define ITERABLE_SECTION_ROM(struct_type, subalign) \
52 SECTION_PROLOGUE(struct_type##_area,,SUBALIGN(subalign)) \
54 Z_LINK_ITERABLE(struct_type); \
55 } GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
66#define ITERABLE_SECTION_ROM_NUMERIC(struct_type, subalign) \
67 SECTION_PROLOGUE(struct_type##_area, EMPTY, SUBALIGN(subalign)) \
69 Z_LINK_ITERABLE_NUMERIC(struct_type); \
70 } GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
84#define ITERABLE_SECTION_ROM_GC_ALLOWED(struct_type, subalign) \
85 SECTION_PROLOGUE(struct_type##_area,,SUBALIGN(subalign)) \
87 Z_LINK_ITERABLE_GC_ALLOWED(struct_type); \
88 } GROUP_LINK_IN(ROMABLE_REGION)
104#define ITERABLE_SECTION_RAM(struct_type, subalign) \
105 SECTION_DATA_PROLOGUE(struct_type##_area,,SUBALIGN(subalign)) \
107 Z_LINK_ITERABLE(struct_type); \
108 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
119#define ITERABLE_SECTION_RAM_NUMERIC(struct_type, subalign) \
120 SECTION_PROLOGUE(struct_type##_area, EMPTY, SUBALIGN(subalign)) \
122 Z_LINK_ITERABLE_NUMERIC(struct_type); \
123 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
137#define ITERABLE_SECTION_RAM_GC_ALLOWED(struct_type, subalign) \
138 SECTION_DATA_PROLOGUE(struct_type##_area,,SUBALIGN(subalign)) \
140 Z_LINK_ITERABLE_GC_ALLOWED(struct_type); \
141 } GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)