From 4f7940167d172858e37373bc330c7093e8765d5b Mon Sep 17 00:00:00 2001 From: Rbb666 Date: Mon, 22 Apr 2024 10:10:48 +0800 Subject: [PATCH] [bsp][renesas]Link script adds finsh related sections. --- bsp/renesas/ra8d1-ek/script/fsp.ld | 56 +++++++++++++++++++- bsp/renesas/ra8d1-vision-board/script/fsp.ld | 28 ++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/bsp/renesas/ra8d1-ek/script/fsp.ld b/bsp/renesas/ra8d1-ek/script/fsp.ld index 0006ec6281..b57a099dcc 100644 --- a/bsp/renesas/ra8d1-ek/script/fsp.ld +++ b/bsp/renesas/ra8d1-ek/script/fsp.ld @@ -96,7 +96,7 @@ MEMORY } /* Library configurations */ -GROUP(libgcc.a libc.a libm.a libnosys.a) +GROUP(libc.a libm.a libnosys.a) /* Linker script to place sections and symbol values. Should be used together * with other linker script that defines memory regions FLASH and RAM. @@ -181,6 +181,26 @@ SECTIONS KEEP(*(.init)) KEEP(*(.fini)) + /* section information for finsh shell */ + . = ALIGN(4); + __fsymtab_start = .; + KEEP(*(FSymTab)) + __fsymtab_end = .; + + . = ALIGN(4); + __vsymtab_start = .; + KEEP(*(VSymTab)) + __vsymtab_end = .; + + /* section information for initial. */ + . = ALIGN(4); + __rt_init_start = .; + KEEP(*(SORT(.rti_fn*))) + __rt_init_end = .; + + . = ALIGN(4); + KEEP(*(FalPartTable)) + /* .ctors */ *crtbegin.o(.ctors) *crtbegin?.o(.ctors) @@ -213,6 +233,14 @@ SECTIONS KEEP(*(.eh_frame*)) + /* new GCC version uses .init_array */ + PROVIDE(__ctors_start__ = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array)) + PROVIDE(__ctors_end__ = .); + + . = ALIGN(4); + __ROM_End = .; } > FLASH = 0xFF @@ -566,6 +594,19 @@ SECTIONS __noinit_end = .; } > RAM + . = .; + __nocache_pre_location = .; + .nocache ALIGN(32) (NOLOAD): + { + __nocache_start = .; + + KEEP(*(.nocache)) + + . = ALIGN(32); + __nocache_end = .; + } > RAM + . = (SIZEOF(.nocache) > 0) ? __nocache_end : __nocache_pre_location; + .bss : { . = ALIGN(4); @@ -649,6 +690,19 @@ SECTIONS __SDRAM_End = .; } > SDRAM + . = .; + __nocache_sdram_pre_location = .; + .nocache_sdram ALIGN(32) (NOLOAD): + { + __nocache_sdram_start = .; + + KEEP(*(.nocache_sdram)) + + . = ALIGN(32); + __nocache_sdram_end = .; + } > SDRAM + . = (SIZEOF(.nocache_sdram) > 0) ? __nocache_sdram_end : __nocache_sdram_pre_location; + /* Note: There are no secure/non-secure boundaries for SDRAM. These symbols are provided for the RA configuration tool. */ __tz_SDRAM_N = __SDRAM_End; diff --git a/bsp/renesas/ra8d1-vision-board/script/fsp.ld b/bsp/renesas/ra8d1-vision-board/script/fsp.ld index 96f57aabd7..b57a099dcc 100644 --- a/bsp/renesas/ra8d1-vision-board/script/fsp.ld +++ b/bsp/renesas/ra8d1-vision-board/script/fsp.ld @@ -181,6 +181,26 @@ SECTIONS KEEP(*(.init)) KEEP(*(.fini)) + /* section information for finsh shell */ + . = ALIGN(4); + __fsymtab_start = .; + KEEP(*(FSymTab)) + __fsymtab_end = .; + + . = ALIGN(4); + __vsymtab_start = .; + KEEP(*(VSymTab)) + __vsymtab_end = .; + + /* section information for initial. */ + . = ALIGN(4); + __rt_init_start = .; + KEEP(*(SORT(.rti_fn*))) + __rt_init_end = .; + + . = ALIGN(4); + KEEP(*(FalPartTable)) + /* .ctors */ *crtbegin.o(.ctors) *crtbegin?.o(.ctors) @@ -213,6 +233,14 @@ SECTIONS KEEP(*(.eh_frame*)) + /* new GCC version uses .init_array */ + PROVIDE(__ctors_start__ = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array)) + PROVIDE(__ctors_end__ = .); + + . = ALIGN(4); + __ROM_End = .; } > FLASH = 0xFF