app_memdomain: ARC: adjust asembler directives for MWDT toolchain

ARC MWDT assembler has slightly different directives names:
.pushsect instead of .pushsection
.popsect instead of .popsection

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
This commit is contained in:
Eugeniy Paltsev 2020-09-02 13:53:44 +03:00 committed by Maureen Helm
commit 6b8f92be08

View file

@ -86,13 +86,24 @@ struct z_app_region {
#define Z_PROGBITS_SYM "@"
#endif
#if defined(CONFIG_ARC) && defined(__CCAC__)
/* ARC MWDT assembler has slightly different pushsection/popsection directives
* names.
*/
#define Z_PUSHSECTION_DIRECTIV ".pushsect"
#define Z_POPSECTION_DIRECTIVE ".popsect"
#else
#define Z_PUSHSECTION_DIRECTIV ".pushsection"
#define Z_POPSECTION_DIRECTIVE ".popsection"
#endif
#define Z_APPMEM_PLACEHOLDER(name) \
__asm__ ( \
".pushsection " STRINGIFY(K_APP_DMEM_SECTION(name)) \
Z_PUSHSECTION_DIRECTIV " " STRINGIFY(K_APP_DMEM_SECTION(name)) \
",\"aw\"," Z_PROGBITS_SYM "progbits\n\t" \
".global " STRINGIFY(name) "_placeholder\n\t" \
STRINGIFY(name) "_placeholder:\n\t" \
".popsection\n\t")
Z_POPSECTION_DIRECTIVE "\n\t")
/**
* @brief Define an application memory partition with linker support