mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 23:47:24 +00:00
07f5b966aa
Provide a default linker script for SPL binaries. Start address and size of text section and BSS section are configurable. All sections are arranged in a way that only relevant sections are kept in the code section for maximum size reduction. All other sections are kept but moved outside the code section to help with debugging. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Marek Vasut <marex@denx.de>
90 lines
1.1 KiB
Text
90 lines
1.1 KiB
Text
/*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
MEMORY { .spl_mem : ORIGIN = CONFIG_SPL_TEXT_BASE, \
|
|
LENGTH = CONFIG_SPL_MAX_SIZE }
|
|
MEMORY { .bss_mem : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \
|
|
LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
|
|
|
|
OUTPUT_ARCH(mips)
|
|
ENTRY(_start)
|
|
SECTIONS
|
|
{
|
|
. = 0x00000000;
|
|
|
|
. = ALIGN(4);
|
|
.text : {
|
|
*(.text*)
|
|
} > .spl_mem
|
|
|
|
. = ALIGN(4);
|
|
.rodata : {
|
|
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
|
} > .spl_mem
|
|
|
|
. = ALIGN(4);
|
|
.data : {
|
|
*(SORT_BY_ALIGNMENT(.data*))
|
|
*(SORT_BY_ALIGNMENT(.sdata*))
|
|
} > .spl_mem
|
|
|
|
#ifdef CONFIG_SPL_DM
|
|
. = ALIGN(4);
|
|
.u_boot_list : {
|
|
KEEP(*(SORT(.u_boot_list*)));
|
|
} > .spl_mem
|
|
#endif
|
|
|
|
. = ALIGN(4);
|
|
__image_copy_end = .;
|
|
|
|
.bss (NOLOAD) : {
|
|
__bss_start = .;
|
|
*(.bss*)
|
|
*(.sbss*)
|
|
*(COMMON)
|
|
. = ALIGN(4);
|
|
__bss_end = .;
|
|
} > .bss_mem
|
|
|
|
.rel.dyn (NOLOAD) : {
|
|
*(.rel.dyn)
|
|
}
|
|
|
|
.dynsym : {
|
|
*(.dynsym)
|
|
}
|
|
|
|
.dynbss : {
|
|
*(.dynbss)
|
|
}
|
|
|
|
.dynstr : {
|
|
*(.dynstr)
|
|
}
|
|
|
|
.dynamic : {
|
|
*(.dynamic)
|
|
}
|
|
|
|
.plt : {
|
|
*(.plt)
|
|
}
|
|
|
|
.interp : {
|
|
*(.interp)
|
|
}
|
|
|
|
.gnu : {
|
|
*(.gnu*)
|
|
}
|
|
|
|
.MIPS.stubs : {
|
|
*(.MIPS.stubs)
|
|
}
|
|
|
|
.hash : {
|
|
*(.hash)
|
|
}
|
|
}
|