From e10dec0fe72c19320d2c93b905457a5327ec1235 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 30 Apr 2021 15:47:10 +0200 Subject: bsps: Support RTEMS_NOINIT in linkcmds Update #3866. --- bsps/riscv/include/bsp/linker-symbols.h | 4 ++++ bsps/riscv/shared/start/linkcmds.base.in | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'bsps/riscv') diff --git a/bsps/riscv/include/bsp/linker-symbols.h b/bsps/riscv/include/bsp/linker-symbols.h index f9deda00f2..87a3a9cd85 100644 --- a/bsps/riscv/include/bsp/linker-symbols.h +++ b/bsps/riscv/include/bsp/linker-symbols.h @@ -63,6 +63,10 @@ LINKER_SYMBOL(bsp_section_rtemsstack_begin) LINKER_SYMBOL(bsp_section_rtemsstack_end) LINKER_SYMBOL(bsp_section_rtemsstack_size) +LINKER_SYMBOL(bsp_section_noinit_begin) +LINKER_SYMBOL(bsp_section_noinit_end) +LINKER_SYMBOL(bsp_section_noinit_size) + LINKER_SYMBOL(bsp_section_work_begin) LINKER_SYMBOL(bsp_section_work_end) LINKER_SYMBOL(bsp_section_work_size) diff --git a/bsps/riscv/shared/start/linkcmds.base.in b/bsps/riscv/shared/start/linkcmds.base.in index f114bb885a..5f4294dd9a 100644 --- a/bsps/riscv/shared/start/linkcmds.base.in +++ b/bsps/riscv/shared/start/linkcmds.base.in @@ -314,6 +314,13 @@ SECTIONS { } > REGION_RTEMSSTACK AT > REGION_RTEMSSTACK bsp_section_rtemsstack_size = bsp_section_rtemsstack_end - bsp_section_rtemsstack_begin; + .noinit (NOLOAD) : @RISCV_LINKER_ALIGN_DIRECTIVE@ { + bsp_section_noinit_begin = .; + *(.noinit*) + bsp_section_noinit_end = .; + } > REGION_WORK AT > REGION_WORK + bsp_section_noinit_size = bsp_section_noinit_end - bsp_section_noinit_begin; + .work (NOLOAD) : @RISCV_LINKER_ALIGN_DIRECTIVE@ { /* * The work section will occupy the remaining REGION_WORK region and -- cgit v1.2.3