Skip to content

Commit c3c026e

Browse files
dbalutanashif
authored andcommitted
arch/xtensa: adsp: Rename module_init section
.module_init sections is used to keep all components constructor functions. Zephyr uses -ffunction-sections option which will create a section for each function. Unfortunately, this creates a section named .module_init for the function module_init() used to initialize the processing module generic layer. Thus, places module_init() in the constructor area named .module_init which is wrong. To avoid this we rename .module_init section for constructors to .initcall. Signed-off-by: Daniel Baluta <[email protected]>
1 parent fb2a966 commit c3c026e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

soc/xtensa/intel_adsp/common/include/cavs-link.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ SECTIONS {
311311

312312
.module_init : {
313313
_module_init_start = .;
314-
*(*.module_init)
314+
*(*.initcall)
315315
_module_init_end = .;
316316
} >ram
317317

soc/xtensa/nxp_adsp/imx8/linker.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ SECTIONS
339339
.module_init : ALIGN(4)
340340
{
341341
_module_init_start = ABSOLUTE(.);
342-
*(*.module_init)
342+
*(*.initcall)
343343
_module_init_end = ABSOLUTE(.);
344344
} >sdram0 :sdram0_phdr
345345

soc/xtensa/nxp_adsp/imx8m/linker.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ SECTIONS
339339
.module_init : ALIGN(4)
340340
{
341341
_module_init_start = ABSOLUTE(.);
342-
*(*.module_init)
342+
*(*.initcall)
343343
_module_init_end = ABSOLUTE(.);
344344
} >sdram0 :sdram0_phdr
345345

0 commit comments

Comments
 (0)