mirror of
https://github.com/apache/nuttx.git
synced 2026-10-02 11:48:02 +00:00
arch/x86_64: don't place the idle stack base below _ebss
The -16 in g_idle_topstack put the derived CPU0 idle stack base at _ebss - 16, and tls_init_info() writes the TLS info there, corrupting the last 16 bytes of .bss. Start the stack at _ebss like other architectures. Assisted-by: Claude Code Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
parent
d855b5662d
commit
b4ea7848c6
1 changed files with 3 additions and 1 deletions
|
|
@ -55,8 +55,10 @@
|
|||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/* The CPU0 idle stack starts at _ebss */
|
||||
|
||||
const uintptr_t g_idle_topstack = (uintptr_t)_ebss +
|
||||
CONFIG_IDLETHREAD_STACKSIZE - 16;
|
||||
CONFIG_IDLETHREAD_STACKSIZE;
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_allocate_heap
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue