Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 1 | /* 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 | */ |
| 9 | MEMORY { .spl_mem : ORIGIN = IMAGE_TEXT_BASE, LENGTH = IMAGE_MAX_SIZE } |
| 10 | MEMORY { .bss_mem : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ |
| 11 | LENGTH = CONFIG_SPL_BSS_MAX_SIZE } |
| 12 | |
| 13 | OUTPUT_ARCH("riscv") |
| 14 | ENTRY(_start) |
| 15 | |
| 16 | SECTIONS |
| 17 | { |
| 18 | . = ALIGN(4); |
Yao Zi | a97117d | 2025-04-16 16:25:33 +0000 | [diff] [blame^] | 19 | __image_copy_start = ADDR(.text); |
Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 20 | .text : { |
| 21 | arch/riscv/cpu/start.o (.text) |
| 22 | *(.text*) |
| 23 | } > .spl_mem |
| 24 | |
| 25 | . = ALIGN(4); |
| 26 | .rodata : { |
| 27 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 28 | } > .spl_mem |
| 29 | |
| 30 | . = ALIGN(4); |
| 31 | .data : { |
| 32 | *(.data*) |
| 33 | } > .spl_mem |
| 34 | . = ALIGN(4); |
| 35 | |
Andrew Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 36 | __u_boot_list : { |
| 37 | KEEP(*(SORT(__u_boot_list*))); |
Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 38 | } > .spl_mem |
| 39 | |
| 40 | . = ALIGN(4); |
| 41 | |
| 42 | .binman_sym_table : { |
| 43 | __binman_sym_start = .; |
| 44 | KEEP(*(SORT(.binman_sym*))); |
| 45 | __binman_sym_end = .; |
| 46 | } > .spl_mem |
| 47 | |
Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 48 | _end = .; |
Pragnesh Patel | 45b4ad9d | 2020-05-29 11:33:23 +0530 | [diff] [blame] | 49 | _image_binary_end = .; |
Yao Zi | a97117d | 2025-04-16 16:25:33 +0000 | [diff] [blame^] | 50 | __image_copy_end = .; |
Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 51 | |
| 52 | .bss : { |
| 53 | __bss_start = .; |
| 54 | *(.bss*) |
Rick Chen | 55bc1bd | 2019-11-14 13:52:27 +0800 | [diff] [blame] | 55 | . = ALIGN(8); |
Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 56 | __bss_end = .; |
| 57 | } > .bss_mem |
| 58 | } |