Skip to content

Commit 5030938

Browse files
wearyzenmmahadevan108
authored andcommitted
arm: linker: fix: incorrect __kernel_ram_start
What is changed? arch32 related changes in linker script made in commit ad71901 are reverted. Why do we need this change? The main intention of the previous commit was to fix the broken ci for aarch64. There was no issue reported for aarch32 and changes were made for consistency. However, it looks like keeping the `__kernel_ram_start` outside of the bss section works differently for different boards. For fvp_baser_aemv8r arch32, _bss_start points to _rom_region_end and __kernel_ram_start points to some region between _rom_region_start and _rom_region_end which leads to test failure. While for other board like v2m_musca_b1, _bss_start and __kernel_ram_start are same. The linker scripts might need a cleanup to avoid issues because of these inconsistncies however, till we understand this better, we need to revert this change. Signed-off-by: Sudan Landge <[email protected]>
1 parent f23318f commit 5030938

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/zephyr/arch/arm/cortex_a_r/scripts/linker.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ SECTIONS
293293
_app_smem_rom_start = LOADADDR(_APP_SMEM_SECTION_NAME);
294294
#endif /* CONFIG_USERSPACE */
295295

296-
__kernel_ram_start = .;
297296
SECTION_DATA_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD), BSS_ALIGN)
298297
{
299298
/*
@@ -302,6 +301,7 @@ SECTIONS
302301
*/
303302
. = ALIGN(4);
304303
__bss_start = .;
304+
__kernel_ram_start = .;
305305

306306
*(.bss)
307307
*(".bss.*")

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ SECTIONS
289289
_app_smem_size = _app_smem_end - _app_smem_start;
290290
_app_smem_rom_start = LOADADDR(_APP_SMEM_SECTION_NAME);
291291

292-
__kernel_ram_start = .;
293292
SECTION_DATA_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),)
294293
{
295294
/*
@@ -298,6 +297,7 @@ SECTIONS
298297
*/
299298
. = ALIGN(4);
300299
__bss_start = .;
300+
__kernel_ram_start = .;
301301

302302
*(.bss)
303303
*(".bss.*")
@@ -358,7 +358,6 @@ SECTIONS
358358
__data_region_end = .;
359359

360360
#ifndef CONFIG_USERSPACE
361-
__kernel_ram_start = .;
362361
SECTION_DATA_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),)
363362
{
364363
/*
@@ -367,6 +366,7 @@ SECTIONS
367366
*/
368367
. = ALIGN(4);
369368
__bss_start = .;
369+
__kernel_ram_start = .;
370370

371371
*(.bss)
372372
*(".bss.*")

0 commit comments

Comments
 (0)