Skip to content

Commit 2129def

Browse files
committed
init: Add an extra '_' between level names and priority in sections
This is an optional commit, but it makes things slightly easier to read in zephyr.map. Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent ac25636 commit 2129def

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

cmake/modules/extensions.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5197,18 +5197,18 @@ function(zephyr_linker_section_obj_level)
51975197

51985198
zephyr_linker_section_configure(
51995199
SECTION ${OBJ_SECTION}
5200-
INPUT ".z_${OBJ_SECTION}_${OBJ_LEVEL}?_*"
5200+
INPUT ".z_${OBJ_SECTION}_${OBJ_LEVEL}_?_*"
52015201
SYMBOLS __${OBJ_SECTION}_${OBJ_LEVEL}_start
52025202
KEEP SORT NAME
52035203
)
52045204
zephyr_linker_section_configure(
52055205
SECTION ${OBJ_SECTION}
5206-
INPUT ".z_${OBJ_SECTION}_${OBJ_LEVEL}??_*"
5206+
INPUT ".z_${OBJ_SECTION}_${OBJ_LEVEL}_??_*"
52075207
KEEP SORT NAME
52085208
)
52095209
zephyr_linker_section_configure(
52105210
SECTION ${OBJ_SECTION}
5211-
INPUT ".z_${OBJ_SECTION}_${OBJ_LEVEL}???_*"
5211+
INPUT ".z_${OBJ_SECTION}_${OBJ_LEVEL}_???_*"
52125212
KEEP SORT NAME
52135213
)
52145214
endfunction()

include/zephyr/init.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ struct init_entry {
149149
* linker scripts to sort them according to the specified level and priority.
150150
*/
151151
#define Z_INIT_ENTRY_SECTION(level, prio) \
152-
__attribute__((__section__(".z_init_" #level STRINGIFY(prio)"_")))
152+
__attribute__((__section__(".z_init_" #level "_" STRINGIFY(prio)"_")))
153153

154154

155155
/* Designated initializers where added to C in C99. There were added to

include/zephyr/linker/linker-defs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
*/
4747
#define CREATE_OBJ_LEVEL(object, level) \
4848
__##object##_##level##_start = .; \
49-
KEEP(*(SORT(.z_##object##_##level?_*))); \
50-
KEEP(*(SORT(.z_##object##_##level??_*))); \
51-
KEEP(*(SORT(.z_##object##_##level???_*)));
49+
KEEP(*(SORT(.z_##object##_##level##_?_*))); \
50+
KEEP(*(SORT(.z_##object##_##level##_??_*))); \
51+
KEEP(*(SORT(.z_##object##_##level##_???_*)));
5252

5353
/*
5454
* link in shell initialization objects for all modules that use shell and

0 commit comments

Comments
 (0)