From 4586aafb067b20dba5b4f673357c650629be4b3f Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Wed, 24 May 2023 15:03:39 +0800 Subject: [PATCH] bsp,abstract-machine: fix shell command table during linking --- bsp/abstract-machine/extra.ld | 11 +++++++++++ bsp/abstract-machine/src/init.c | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bsp/abstract-machine/extra.ld b/bsp/abstract-machine/extra.ld index 38e4e13..abc2d15 100644 --- a/bsp/abstract-machine/extra.ld +++ b/bsp/abstract-machine/extra.ld @@ -2,6 +2,17 @@ SECTIONS { . = ALIGN(8); .myextra : { + /* section information for finsh shell */ + . = ALIGN(8); + __fsymtab_start = .; + KEEP(*(FSymTab)) + __fsymtab_end = .; + . = ALIGN(8); + __vsymtab_start = .; + KEEP(*(VSymTab)) + __vsymtab_end = .; + . = ALIGN(8); + /* section information for initial. */ . = ALIGN(8); __rt_init_start = .; diff --git a/bsp/abstract-machine/src/init.c b/bsp/abstract-machine/src/init.c index 3121a5c..26fa5b9 100644 --- a/bsp/abstract-machine/src/init.c +++ b/bsp/abstract-machine/src/init.c @@ -1,9 +1,6 @@ #include #include -void *__fsymtab_start = NULL; -void *__fsymtab_end = NULL; - #define RT_HW_HEAP_BEGIN heap.start #define RT_HW_HEAP_END heap.end