From 9b44cca4ce1c8426ecec77136c2b1f520c1f31d4 Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Fri, 5 Jan 2024 15:34:04 +0200 Subject: [PATCH] tests: Fix location of __edata section and comment original --- tests/link_ram_cortex_m.x | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/link_ram_cortex_m.x b/tests/link_ram_cortex_m.x index 5cb23a642..39a31b52a 100644 --- a/tests/link_ram_cortex_m.x +++ b/tests/link_ram_cortex_m.x @@ -133,14 +133,18 @@ SECTIONS { . = ALIGN(4); __sdata = .; + __edata = .; /* RAM: By setting __sdata=__edata cortex-m-rt has to copy 0 bytes as .data is already in RAM */ + *(.data .data.*); . = ALIGN(4); /* 4-byte align the end (VMA) of this section */ } > RAM /* Allow sections from user `memory.x` injected using `INSERT AFTER .data` to * use the .data loading mechanism by pushing __edata. Note: do not change * output region or load region in those user sections! */ + /* Link from RAM: Disabled, now __sdata == __edata . = ALIGN(4); __edata = .; + */ /* LMA of .data */ __sidata = LOADADDR(.data);