blob: d1113a59aa69f13a9d7932824a0bff2f489c553d [file] [log] [blame]
Lukas Auer396f0bd2019-08-21 21:14:45 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Based on arch/riscv/cpu/u-boot.lds, which is
4 * Copyright (C) 2017 Andes Technology Corporation
5 * Rick Chen, Andes Technology Corporation <rick@andestech.com>
6 *
7 * and arch/mips/cpu/u-boot-spl.lds.
8 */
9MEMORY { .spl_mem : ORIGIN = IMAGE_TEXT_BASE, LENGTH = IMAGE_MAX_SIZE }
10MEMORY { .bss_mem : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \
11 LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
12
13OUTPUT_ARCH("riscv")
14ENTRY(_start)
15
16SECTIONS
17{
18 . = ALIGN(4);
19 .text : {
20 arch/riscv/cpu/start.o (.text)
21 *(.text*)
22 } > .spl_mem
23
24 . = ALIGN(4);
25 .rodata : {
26 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
27 } > .spl_mem
28
29 . = ALIGN(4);
30 .data : {
31 *(.data*)
32 } > .spl_mem
33 . = ALIGN(4);
34
Andrew Scull5a9095c2022-05-30 10:00:04 +000035 __u_boot_list : {
36 KEEP(*(SORT(__u_boot_list*)));
Lukas Auer396f0bd2019-08-21 21:14:45 +020037 } > .spl_mem
38
39 . = ALIGN(4);
40
41 .binman_sym_table : {
42 __binman_sym_start = .;
43 KEEP(*(SORT(.binman_sym*)));
44 __binman_sym_end = .;
45 } > .spl_mem
46
Bin Meng44787272023-04-13 14:20:08 +080047 . = ALIGN(8);
Lukas Auer396f0bd2019-08-21 21:14:45 +020048
Lukas Auer396f0bd2019-08-21 21:14:45 +020049 _end = .;
Pragnesh Patel45b4ad9d2020-05-29 11:33:23 +053050 _image_binary_end = .;
Lukas Auer396f0bd2019-08-21 21:14:45 +020051
52 .bss : {
53 __bss_start = .;
54 *(.bss*)
Rick Chen55bc1bd2019-11-14 13:52:27 +080055 . = ALIGN(8);
Lukas Auer396f0bd2019-08-21 21:14:45 +020056 __bss_end = .;
57 } > .bss_mem
58}