init: tweak Zephyr .init* section name conflicting with toolchain
In case of ARC MWDT toolchain and C++ support enabled the Zephyr .init* section conflicts with .init* sections derived from toolchain libs. Let's add 'z_' prefix to Zephyr .init* section (and therefore .device section as they share the same macros) to make Zephyr section name unique. Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
parent
292a15be78
commit
2b76f0fee2
4 changed files with 6 additions and 6 deletions
|
@ -85,7 +85,7 @@ void z_sys_init_run_level(int32_t level);
|
|||
#define Z_INIT_ENTRY_DEFINE(_entry_name, _init_fn, _device, _level, _prio) \
|
||||
static const Z_DECL_ALIGN(struct init_entry) \
|
||||
_CONCAT(__init_, _entry_name) __used \
|
||||
__attribute__((__section__(".init_" #_level STRINGIFY(_prio)"_"))) = { \
|
||||
__attribute__((__section__(".z_init_" #_level STRINGIFY(_prio)"_"))) = { \
|
||||
.init = (_init_fn), \
|
||||
.dev = (_device), \
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue