linker: tweak section naming to feet all linkers

MWDT toolchain adds additional suffix to sections name in case of
ffunction-sections / fdata-sections are enabled.

As proposed by Andy Ross let's pick a single set of rules
and syntax that work.

Suggested-by: Andy Ross <andy@plausible.org>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
This commit is contained in:
Eugeniy Paltsev 2020-09-02 16:52:09 +03:00 committed by Maureen Helm
commit 0a7b65ef5e
6 changed files with 14 additions and 14 deletions

View file

@ -39,7 +39,7 @@
#ifdef _LINKER
#define Z_LINK_ITERABLE(struct_type) \
_CONCAT(_##struct_type, _list_start) = .; \
KEEP(*(SORT_BY_NAME(._##struct_type##.static.*))); \
KEEP(*(SORT_BY_NAME(._##struct_type.static.*))); \
_CONCAT(_##struct_type, _list_end) = .
/* Define an output section which will set up an iterable area
@ -74,8 +74,8 @@
*/
#define CREATE_OBJ_LEVEL(object, level) \
__##object##_##level##_start = .; \
KEEP(*(SORT(.##object##_##level[0-9]))); \
KEEP(*(SORT(.##object##_##level[1-9][0-9])));
KEEP(*(SORT(.object##_##level[0-9]*))); \
KEEP(*(SORT(.object##_##level[1-9][0-9]*)));
/*
* link in shell initialization objects for all modules that use shell and