From 64e349a5f1765830ea3f63faa8bc45a8814598f4 Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Sun, 4 Jun 2023 16:58:36 +0800 Subject: [PATCH] bsp,abstract-machine,extra.ld: use INSERT BEFORE command --- bsp/abstract-machine/Makefile | 2 +- bsp/abstract-machine/extra.ld | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/bsp/abstract-machine/Makefile b/bsp/abstract-machine/Makefile index a09cceb..962a45f 100644 --- a/bsp/abstract-machine/Makefile +++ b/bsp/abstract-machine/Makefile @@ -7,7 +7,7 @@ NAME = rtthread SRCS = $(shell find src -name "*.c") CFLAGS += -DHAVE_CCONFIG_H -D__RTTHREAD__ CFLAGS += -Wno-nonnull-compare -LDFLAGS += extra.ld +LDFLAGS += -T extra.ld -include $(FILE_MK) include $(AM_HOME)/Makefile diff --git a/bsp/abstract-machine/extra.ld b/bsp/abstract-machine/extra.ld index abc2d15..071b247 100644 --- a/bsp/abstract-machine/extra.ld +++ b/bsp/abstract-machine/extra.ld @@ -1,9 +1,6 @@ SECTIONS { - . = ALIGN(8); - - .myextra : { + .data.extra : { /* section information for finsh shell */ - . = ALIGN(8); __fsymtab_start = .; KEEP(*(FSymTab)) __fsymtab_end = .; @@ -24,7 +21,5 @@ SECTIONS { KEEP(*(UtestTcTab)) __rt_utest_tc_tab_end = .; } - end = .; - _end = .; - _heap_start = ALIGN(0x1000); } +INSERT BEFORE .data;