Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Atmel Corporation |
| 4 | * Bo Shen <voice.shen@atmel.com> |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
Tom Rini | 2aaa27d | 2019-01-22 17:09:26 -0500 | [diff] [blame] | 7 | MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE, \ |
| 8 | LENGTH = IMAGE_MAX_SIZE } |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 9 | MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ |
| 10 | LENGTH = CONFIG_SPL_BSS_MAX_SIZE } |
| 11 | |
| 12 | OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") |
| 13 | OUTPUT_ARCH(arm) |
| 14 | ENTRY(_start) |
| 15 | SECTIONS |
| 16 | { |
| 17 | .text : |
| 18 | { |
| 19 | __start = .; |
| 20 | *(.vectors) |
| 21 | arch/arm/cpu/arm926ejs/start.o (.text*) |
| 22 | *(.text*) |
| 23 | } >.sram |
| 24 | |
| 25 | . = ALIGN(4); |
| 26 | .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } >.sram |
| 27 | |
| 28 | . = ALIGN(4); |
| 29 | .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram |
| 30 | |
| 31 | . = ALIGN(4); |
Tom Rini | 0ed608e | 2016-03-15 17:56:29 -0400 | [diff] [blame] | 32 | .u_boot_list : { KEEP(*(SORT(.u_boot_list*))) } > .sram |
| 33 | |
| 34 | . = ALIGN(4); |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 35 | __image_copy_end = .; |
| 36 | |
| 37 | .end : |
| 38 | { |
| 39 | *(.__end) |
| 40 | } >.sram |
| 41 | |
Stefan Roese | 9e35086 | 2019-04-02 10:57:22 +0200 | [diff] [blame] | 42 | _image_binary_end = .; |
| 43 | |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 44 | .bss : |
| 45 | { |
| 46 | . = ALIGN(4); |
| 47 | __bss_start = .; |
| 48 | *(.bss*) |
| 49 | . = ALIGN(4); |
| 50 | __bss_end = .; |
| 51 | } >.sdram |
| 52 | } |
Eugen.Hristev@microchip.com | 40ef512 | 2018-11-28 09:33:43 +0000 | [diff] [blame] | 53 | |
Tom Rini | 2aaa27d | 2019-01-22 17:09:26 -0500 | [diff] [blame] | 54 | #if defined(IMAGE_MAX_SIZE) |
Simon Goldschmidt | a76a458 | 2019-04-25 21:22:39 +0200 | [diff] [blame] | 55 | ASSERT(__image_copy_end - __start <= (IMAGE_MAX_SIZE), \ |
Eugen.Hristev@microchip.com | 40ef512 | 2018-11-28 09:33:43 +0000 | [diff] [blame] | 56 | "SPL image too big"); |
| 57 | #endif |
| 58 | |
| 59 | #if defined(CONFIG_SPL_BSS_MAX_SIZE) |
Simon Goldschmidt | a76a458 | 2019-04-25 21:22:39 +0200 | [diff] [blame] | 60 | ASSERT(__bss_end - __bss_start <= (CONFIG_SPL_BSS_MAX_SIZE), \ |
Eugen.Hristev@microchip.com | 40ef512 | 2018-11-28 09:33:43 +0000 | [diff] [blame] | 61 | "SPL image BSS too big"); |
| 62 | #endif |