1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (c) 2004-2008 Texas Instruments
4 *
5 * (C) Copyright 2002
6 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
7 */
8
9OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
10OUTPUT_ARCH(arm)
11ENTRY(_start)
12SECTIONS
13{
14	. = 0x00000000;
15
16	. = ALIGN(4);
17	__image_copy_start = ADDR(.text);
18	.text :
19	{
20		*(.vectors)
21		CPUDIR/start.o (.text*)
22	}
23
24	/* This needs to come before *(.text*) */
25	.efi_runtime : {
26		__efi_runtime_start = .;
27		*(.text.efi_runtime*)
28		*(.rodata.efi_runtime*)
29		*(.data.efi_runtime*)
30		__efi_runtime_stop = .;
31	}
32
33	.text_rest :
34	{
35		*(.text*)
36	}
37
38	. = ALIGN(4);
39	.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
40
41	. = ALIGN(4);
42	.data : {
43		*(.data*)
44	}
45
46	. = ALIGN(4);
47
48	. = .;
49
50	. = ALIGN(4);
51	__u_boot_list : {
52		KEEP(*(SORT(__u_boot_list*)));
53	}
54
55	.efi_runtime_rel : {
56		__efi_runtime_rel_start = .;
57		*(.rel*.efi_runtime)
58		*(.rel*.efi_runtime.*)
59		__efi_runtime_rel_stop = .;
60	}
61
62	. = ALIGN(8);
63	__image_copy_end = .;
64
65	.rel.dyn ALIGN(8) : {
66		__rel_dyn_start = .;
67		*(.rel*)
68		__rel_dyn_end = .;
69	}
70
71	.end :
72	{
73		*(.__end)
74	}
75
76	_image_binary_end = .;
77
78/*
79 * These sections occupy the same memory, but their lifetimes do
80 * not overlap: U-Boot initializes .bss only after applying dynamic
81 * relocations and therefore after it doesn't need .rel.dyn any more.
82 */
83	.bss ADDR(.rel.dyn) (OVERLAY): {
84		__bss_start = .;
85		*(.bss*)
86		. = ALIGN(8);
87		__bss_end = .;
88	}
89
90	/*
91	 * Zynq needs to discard these sections because the user
92	 * is expected to pass this image on to tools for boot.bin
93	 * generation that require them to be dropped.
94	 */
95	/DISCARD/ : { *(.dynsym) }
96	/DISCARD/ : { *(.dynbss*) }
97	/DISCARD/ : { *(.dynstr*) }
98	/DISCARD/ : { *(.dynamic*) }
99	/DISCARD/ : { *(.plt*) }
100	/DISCARD/ : { *(.interp*) }
101	/DISCARD/ : { *(.gnu*) }
102	/DISCARD/ : { *(.ARM.exidx*) }
103	/DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
104}
105