xref: /openbmc/u-boot/arch/arm/cpu/u-boot-spl.lds (revision 62e92077)
1/*
2 * Copyright (c) 2004-2008 Texas Instruments
3 *
4 * (C) Copyright 2002
5 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
6 *
7 * SPDX-License-Identifier:	GPL-2.0+
8 */
9
10OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
11OUTPUT_ARCH(arm)
12ENTRY(_start)
13SECTIONS
14{
15	. = 0x00000000;
16
17	. = ALIGN(4);
18	.text :
19	{
20		__image_copy_start = .;
21		*(.vectors)
22		CPUDIR/start.o (.text*)
23		*(.text*)
24	}
25
26	. = ALIGN(4);
27	.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
28
29	. = ALIGN(4);
30	.data : {
31		*(.data*)
32	}
33
34	. = ALIGN(4);
35#ifdef CONFIG_SPL_DM
36	.u_boot_list : {
37		KEEP(*(SORT(.u_boot_list_*_driver_*)));
38		KEEP(*(SORT(.u_boot_list_*_uclass_*)));
39	}
40#endif
41	. = .;
42	.u_boot_list : {
43		KEEP(*(SORT(.u_boot_list*_i2c_*)));
44	}
45
46	. = ALIGN(4);
47
48	__image_copy_end = .;
49
50	.rel.dyn : {
51		__rel_dyn_start = .;
52		*(.rel*)
53		__rel_dyn_end = .;
54	}
55
56	.end :
57	{
58		*(.__end)
59	}
60
61	_image_binary_end = .;
62
63	.bss __rel_dyn_start (OVERLAY) : {
64		__bss_start = .;
65		*(.bss*)
66		 . = ALIGN(4);
67		__bss_end = .;
68	}
69	__bss_size = __bss_end - __bss_start;
70	.dynsym _image_binary_end : { *(.dynsym) }
71	.dynbss : { *(.dynbss) }
72	.dynstr : { *(.dynstr*) }
73	.dynamic : { *(.dynamic*) }
74	.hash : { *(.hash*) }
75	.plt : { *(.plt*) }
76	.interp : { *(.interp*) }
77	.gnu : { *(.gnu*) }
78	.ARM.exidx : { *(.ARM.exidx*) }
79}
80
81#if defined(CONFIG_SPL_MAX_SIZE)
82ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \
83	"SPL image too big");
84#endif
85
86#if defined(CONFIG_SPL_BSS_MAX_SIZE)
87ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
88	"SPL image BSS too big");
89#endif
90
91#if defined(CONFIG_SPL_MAX_FOOTPRINT)
92ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \
93	"SPL image plus BSS too big");
94#endif
95