f18b17dc931c39a5bdba15d0ae8a628de78ab858
[oweals/u-boot.git] / arch / arm / mach-at91 / arm926ejs / u-boot-spl.lds
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2015 Atmel Corporation
4  *                    Bo Shen <voice.shen@atmel.com>
5  */
6
7 MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE, \
8                 LENGTH = IMAGE_MAX_SIZE }
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);
32         .u_boot_list : { KEEP(*(SORT(.u_boot_list*))) } > .sram
33
34         . = ALIGN(4);
35         __image_copy_end = .;
36
37         .end :
38         {
39                 *(.__end)
40         } >.sram
41
42         .bss :
43         {
44                 . = ALIGN(4);
45                 __bss_start = .;
46                 *(.bss*)
47                 . = ALIGN(4);
48                 __bss_end = .;
49         } >.sdram
50 }
51
52 #if defined(IMAGE_MAX_SIZE)
53 ASSERT(__image_copy_end - __start < (IMAGE_MAX_SIZE), \
54         "SPL image too big");
55 #endif
56
57 #if defined(CONFIG_SPL_BSS_MAX_SIZE)
58 ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
59         "SPL image BSS too big");
60 #endif