Skip to content

Commit 4f106c3

Browse files
dcpleungnashif
authored andcommitted
linker: do not force keep common kernel objects
This uses the new macros so the common kernel objects can be garbage collected if they are not referred directly anywhere in the code. This is useful for reducing library data size as not all library functions and their corresponding kobjects are being used. Fixes #20663 Signed-off-by: Daniel Leung <[email protected]>
1 parent 04d706b commit 4f106c3

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

include/linker/common-ram.ld

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,17 @@
9191
_static_kernel_objects_begin = .;
9292
#endif /* CONFIG_USERSPACE */
9393

94-
Z_ITERABLE_SECTION_RAM(k_timer, 4)
95-
Z_ITERABLE_SECTION_RAM(k_mem_slab, 4)
96-
Z_ITERABLE_SECTION_RAM(k_mem_pool, 4)
97-
Z_ITERABLE_SECTION_RAM(k_heap, 4)
98-
Z_ITERABLE_SECTION_RAM(k_mutex, 4)
99-
Z_ITERABLE_SECTION_RAM(k_stack, 4)
100-
Z_ITERABLE_SECTION_RAM(k_msgq, 4)
101-
Z_ITERABLE_SECTION_RAM(k_mbox, 4)
102-
Z_ITERABLE_SECTION_RAM(k_pipe, 4)
103-
Z_ITERABLE_SECTION_RAM(k_sem, 4)
104-
Z_ITERABLE_SECTION_RAM(k_queue, 4)
94+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_timer, 4)
95+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_slab, 4)
96+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mem_pool, 4)
97+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_heap, 4)
98+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mutex, 4)
99+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_stack, 4)
100+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_msgq, 4)
101+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_mbox, 4)
102+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_pipe, 4)
103+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_sem, 4)
104+
Z_ITERABLE_SECTION_RAM_GC_ALLOWED(k_queue, 4)
105105

106106
SECTION_DATA_PROLOGUE(_net_buf_pool_area,,SUBALIGN(4))
107107
{

0 commit comments

Comments
 (0)