From f9cc56114494a83e82b4a142d9f3cfc41dc7a9f5 Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 29 Sep 2019 01:38:23 +0200 Subject: [PATCH] link.x: fix __stack_start This fixes the memory corruption problem. --- link.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/link.x b/link.x index 3a0c6ca9..e178a788 100644 --- a/link.x +++ b/link.x @@ -60,7 +60,7 @@ SECTIONS . += STACK_SIZE; } > OCM __stack_end = ADDR(.stack); - __stack_start = ADDR(.stack) + SIZEOF(.stack) - 4; + __stack_start = ADDR(.stack) + SIZEOF(.stack); /DISCARD/ : {