Skip to content

Commit 1fa8cf9

Browse files
AdithyaBaglodynashif
authored andcommitted
linker: arm: place priv.noinit at the end of RAM
This puts the priviledged stack at the end of RAM. This combines PR #10507 and #10542. Fixes #10473 Fixes #10474 Fixes #10515 Signed-off-by: Adithya Baglody <[email protected]> Signed-off-by: Daniel Leung <[email protected]>
1 parent 20e2e5b commit 1fa8cf9

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

include/arch/arm/cortex_m/scripts/linker.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ SECTIONS
366366
#include <linker/priv_stacks.ld>
367367
#include <linker/kobject.ld>
368368

369+
#include <linker/priv_stacks-noinit.ld>
370+
369371
__data_ram_end = .;
370372

371373

include/linker/priv_stacks-noinit.ld

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2017 Linaro Limited.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
SECTION_DATA_PROLOGUE(priv_stacks_noinit,,)
8+
{
9+
*(".priv_stacks.noinit")
10+
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)

scripts/sanitycheck

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,8 @@ class SizeCalculator:
655655
"ccm_data", "usb_descriptor", "usb_data", "usb_bos_desc",
656656
'log_backends_sections', 'log_dynamic_sections',
657657
'log_const_sections',"app_smem", 'shell_root_cmds_sections',
658-
'log_const_sections',"app_smem", "font_entry_sections"]
658+
'log_const_sections',"app_smem", "font_entry_sections",
659+
"priv_stacks_noinit"]
659660
# These get copied into RAM only on non-XIP
660661
ro_sections = ["text", "ctors", "init_array", "reset", "object_access",
661662
"rodata", "devconfig", "net_l2", "vector", "_bt_settings_area"]

0 commit comments

Comments
 (0)