From 000b0ec4a1b13b50ec68ef7f285e8773184f124e Mon Sep 17 00:00:00 2001 From: Inochi Amaoto Date: Thu, 18 Jul 2024 08:28:10 +0800 Subject: [PATCH] arch/risc-v: make common up_allocate_heap weak symbol The common `up_allocate_heap` is a strong symbol, which leads to error when building with CONFIG_DEBUG_LINK_WHOLE_ARCHIVE. Make `up_allocate_heap` weak function to mitigate this problem. Signed-off-by: Inochi Amaoto --- arch/risc-v/src/common/riscv_allocateheap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/risc-v/src/common/riscv_allocateheap.c b/arch/risc-v/src/common/riscv_allocateheap.c index 7e88b8f8f3..b4c741a0c4 100644 --- a/arch/risc-v/src/common/riscv_allocateheap.c +++ b/arch/risc-v/src/common/riscv_allocateheap.c @@ -64,7 +64,7 @@ * ****************************************************************************/ -void up_allocate_heap(void **heap_start, size_t *heap_size) +void weak_function up_allocate_heap(void **heap_start, size_t *heap_size) { board_autoled_on(LED_HEAPALLOCATE); *heap_start = (void *)g_idle_topstack;