1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2004-2008 Texas Instruments
6 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
12 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
17 #ifndef CONFIG_CMDLINE
18 /DISCARD/ : { *(__u_boot_list_2_cmd_*) }
20 #if defined(CONFIG_ARMV7_SECURE_BASE) && defined(CONFIG_ARMV7_NONSEC)
22 * If CONFIG_ARMV7_SECURE_BASE is true, secure code will not
23 * bundle with u-boot, and code offsets are fixed. Secure zone
24 * only needs to be copied from the loading address to
25 * CONFIG_ARMV7_SECURE_BASE, which is the linking and running
26 * address for secure code.
28 * If CONFIG_ARMV7_SECURE_BASE is undefined, the secure zone will
29 * be included in u-boot address space, and some absolute address
30 * were used in secure code. The absolute addresses of the secure
31 * code also needs to be relocated along with the accompanying u-boot
34 * So DISCARD is only for CONFIG_ARMV7_SECURE_BASE.
36 /DISCARD/ : { *(.rel._secure*) }
43 *(.__image_copy_start)
45 CPUDIR/start.o (.text*)
48 /* This needs to come before *(.text*) */
49 .__efi_runtime_start : {
50 *(.__efi_runtime_start)
55 *(.rodata.efi_runtime*)
59 .__efi_runtime_stop : {
60 *(.__efi_runtime_stop)
68 #ifdef CONFIG_ARMV7_NONSEC
70 /* Align the secure section only if we're going to use it in situ */
72 #ifndef CONFIG_ARMV7_SECURE_BASE
73 ALIGN(CONSTANT(COMMONPAGESIZE))
76 KEEP(*(.__secure_start))
79 #ifndef CONFIG_ARMV7_SECURE_BASE
80 #define __ARMV7_SECURE_BASE
81 #define __ARMV7_PSCI_STACK_IN_RAM
83 #define __ARMV7_SECURE_BASE CONFIG_ARMV7_SECURE_BASE
86 .secure_text __ARMV7_SECURE_BASE :
87 AT(ADDR(.__secure_start) + SIZEOF(.__secure_start))
92 .secure_data : AT(LOADADDR(.secure_text) + SIZEOF(.secure_text))
97 #ifdef CONFIG_ARMV7_PSCI
98 .secure_stack ALIGN(ADDR(.secure_data) + SIZEOF(.secure_data),
99 CONSTANT(COMMONPAGESIZE)) (NOLOAD) :
100 #ifdef __ARMV7_PSCI_STACK_IN_RAM
101 AT(ADDR(.secure_stack))
103 AT(LOADADDR(.secure_data) + SIZEOF(.secure_data))
106 KEEP(*(.__secure_stack_start))
108 /* Skip addreses for stack */
109 . = . + CONFIG_ARMV7_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE;
111 /* Align end of stack section to page boundary */
112 . = ALIGN(CONSTANT(COMMONPAGESIZE));
114 KEEP(*(.__secure_stack_end))
116 #ifdef CONFIG_ARMV7_SECURE_MAX_SIZE
118 * We are not checking (__secure_end - __secure_start) here,
119 * as these are the load addresses, and do not include the
120 * stack section. Instead, use the end of the stack section
121 * and the start of the text section.
123 ASSERT((. - ADDR(.secure_text)) <= CONFIG_ARMV7_SECURE_MAX_SIZE,
124 "Error: secure section exceeds secure memory size");
128 #ifndef __ARMV7_PSCI_STACK_IN_RAM
129 /* Reset VMA but don't allocate space if we have secure SRAM */
130 . = LOADADDR(.secure_stack);
135 .__secure_end : AT(ADDR(.__secure_end)) {
137 LONG(0x1d1071c); /* Must output something to reset LMA */
142 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
155 KEEP(*(SORT(__u_boot_list*)));
160 .efi_runtime_rel_start :
162 *(.__efi_runtime_rel_start)
167 *(.rel*.efi_runtime.*)
170 .efi_runtime_rel_stop :
172 *(.__efi_runtime_rel_stop)
201 _image_binary_end = .;
204 * Deprecated: this MMU section is used by pxa at present but
205 * should not be used by new boards/CPUs.
213 * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
214 * __bss_base and __bss_limit are for linker only (overlay ordering)
217 .bss_start __rel_dyn_start (OVERLAY) : {
218 KEEP(*(.__bss_start));
222 .bss __bss_base (OVERLAY) : {
228 .bss_end __bss_limit (OVERLAY) : {
232 .dynsym _image_binary_end : { *(.dynsym) }
233 .dynbss : { *(.dynbss) }
234 .dynstr : { *(.dynstr*) }
235 .dynamic : { *(.dynamic*) }
237 .interp : { *(.interp*) }
238 .gnu.hash : { *(.gnu.hash) }
240 .ARM.exidx : { *(.ARM.exidx*) }
241 .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }