[bsp][renesas]Link script adds finsh related sections.

This commit is contained in:
Rbb666 2024-04-22 10:10:48 +08:00
parent e58ecd9e54
commit 4f7940167d
2 changed files with 83 additions and 1 deletions

View File

@ -96,7 +96,7 @@ MEMORY
} }
/* Library configurations */ /* 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 /* Linker script to place sections and symbol values. Should be used together
* with other linker script that defines memory regions FLASH and RAM. * with other linker script that defines memory regions FLASH and RAM.
@ -181,6 +181,26 @@ SECTIONS
KEEP(*(.init)) KEEP(*(.init))
KEEP(*(.fini)) 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 */ /* .ctors */
*crtbegin.o(.ctors) *crtbegin.o(.ctors)
*crtbegin?.o(.ctors) *crtbegin?.o(.ctors)
@ -213,6 +233,14 @@ SECTIONS
KEEP(*(.eh_frame*)) 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 = .; __ROM_End = .;
} > FLASH = 0xFF } > FLASH = 0xFF
@ -566,6 +594,19 @@ SECTIONS
__noinit_end = .; __noinit_end = .;
} > RAM } > 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 : .bss :
{ {
. = ALIGN(4); . = ALIGN(4);
@ -649,6 +690,19 @@ SECTIONS
__SDRAM_End = .; __SDRAM_End = .;
} > SDRAM } > 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. */ /* Note: There are no secure/non-secure boundaries for SDRAM. These symbols are provided for the RA configuration tool. */
__tz_SDRAM_N = __SDRAM_End; __tz_SDRAM_N = __SDRAM_End;

View File

@ -181,6 +181,26 @@ SECTIONS
KEEP(*(.init)) KEEP(*(.init))
KEEP(*(.fini)) 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 */ /* .ctors */
*crtbegin.o(.ctors) *crtbegin.o(.ctors)
*crtbegin?.o(.ctors) *crtbegin?.o(.ctors)
@ -213,6 +233,14 @@ SECTIONS
KEEP(*(.eh_frame*)) 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 = .; __ROM_End = .;
} > FLASH = 0xFF } > FLASH = 0xFF