* SPDX-License-Identifier: GPL-2.0+
*/
+MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
+ LENGTH = CONFIG_SPL_MAX_SIZE }
+MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \
+ LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
+
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
- . = CONFIG_SPL_TEXT_BASE;
-
. = ALIGN(4);
.text :
{
*(.vectors)
CPUDIR/start.o (.text*)
*(.text*)
- }
+ } > .sram
. = ALIGN(4);
- .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
+ .rodata : {
+ *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
+ } > .sram
. = ALIGN(4);
.data : {
*(.data*)
- }
+ } > .sram
. = ALIGN(4);
#ifdef CONFIG_SPL_DM
.u_boot_list : {
KEEP(*(SORT(.u_boot_list_*_driver_*)));
KEEP(*(SORT(.u_boot_list_*_uclass_*)));
- }
+ } > .sram
. = ALIGN(4);
#endif
_image_binary_end = .;
- .rel.dyn : {
- __rel_dyn_start = .;
- *(.rel*)
- __rel_dyn_end = .;
- }
-
_end = .;
- .bss __rel_dyn_start (OVERLAY) : {
+ /* Move BSS section to RAM because of FAT */
+ .bss (NOLOAD) : {
__bss_start = .;
*(.bss*)
. = ALIGN(4);
__bss_end = .;
- }
+ } > .sdram
/DISCARD/ : { *(.dynsym) }
/DISCARD/ : { *(.dynstr*) }
/DISCARD/ : { *(.plt*) }
/DISCARD/ : { *(.interp*) }
/DISCARD/ : { *(.gnu*) }
-
- /* Just random address above 1MB */
- /* There is something wrong in fat implementation */
- . = 0x100000;
- .ddr (NOLOAD) : {
- __ddr_start = .;
- *(.ddr*)
- . = ALIGN(4);
- __ddr_end = .;
- }
}
-
-#if defined(CONFIG_SPL_MAX_SIZE)
-ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \
- "SPL image too big");
-#endif
-
-#if defined(CONFIG_SPL_BSS_MAX_SIZE)
-ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
- "SPL image BSS too big");
-#endif
-
-#if defined(CONFIG_SPL_MAX_FOOTPRINT)
-ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \
- "SPL image plus BSS too big");
-#endif
* Update the number of bytes read in *gotsize or return -1 on fatal errors.
*/
#ifndef CONFIG_ZYNQ_OCM
-#if defined(CONFIG_ARCH_ZYNQ) && defined(CONFIG_SPL_BUILD)
-__section(.ddr)
-#endif
__u8 get_contents_vfatname_block[MAX_CLUSTSIZE]
__aligned(ARCH_DMA_MINALIGN);
#else
* starting at 'startsect'
*/
#ifndef CONFIG_ZYNQ_OCM
-#if defined(CONFIG_ARCH_ZYNQ) && defined(CONFIG_SPL_BUILD)
-__section(.ddr)
-#endif
__u8 get_dentfromdir_block[MAX_CLUSTSIZE]
__aligned(ARCH_DMA_MINALIGN);
#endif
}
#ifndef CONFIG_ZYNQ_OCM
-#if defined(CONFIG_ARCH_ZYNQ) && defined(CONFIG_SPL_BUILD)
-__section(.ddr)
-#endif
__u8 do_fat_read_at_block[MAX_CLUSTSIZE]
__aligned(ARCH_DMA_MINALIGN);
#endif