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); |
| 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 Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 35 | __u_boot_list : { |
| 36 | KEEP(*(SORT(__u_boot_list*))); |
Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 37 | } > .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 | |
Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 47 | _end = .; |
Pragnesh Patel | 45b4ad9d | 2020-05-29 11:33:23 +0530 | [diff] [blame] | 48 | _image_binary_end = .; |
Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 49 | |
| 50 | .bss : { |
| 51 | __bss_start = .; |
| 52 | *(.bss*) |
Rick Chen | 55bc1bd | 2019-11-14 13:52:27 +0800 | [diff] [blame] | 53 | . = ALIGN(8); |
Lukas Auer | 396f0bd | 2019-08-21 21:14:45 +0200 | [diff] [blame] | 54 | __bss_end = .; |
| 55 | } > .bss_mem |
| 56 | } |