Skip to content

Commit

Permalink
[bsp][renesas]Link script adds finsh related sections.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rbb666 committed Apr 22, 2024
1 parent e58ecd9 commit 4f79401
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 1 deletion.
56 changes: 55 additions & 1 deletion bsp/renesas/ra8d1-ek/script/fsp.ld
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down
28 changes: 28 additions & 0 deletions bsp/renesas/ra8d1-vision-board/script/fsp.ld
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 4f79401

Please sign in to comment.