Răsfoiți Sursa

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

Rbb666 1 an în urmă
părinte
comite
4f7940167d

+ 55 - 1
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;
 

+ 28 - 0
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