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 CONFIG_ARMV7_SECURE_BASE
81 #define __ARMV7_PSCI_STACK_IN_RAM
84 .secure_text CONFIG_ARMV7_SECURE_BASE :
85 AT(ADDR(.__secure_start) + SIZEOF(.__secure_start))
90 .secure_data : AT(LOADADDR(.secure_text) + SIZEOF(.secure_text))
95 #ifdef CONFIG_ARMV7_PSCI
96 .secure_stack ALIGN(ADDR(.secure_data) + SIZEOF(.secure_data),
97 CONSTANT(COMMONPAGESIZE)) (NOLOAD) :
98 #ifdef __ARMV7_PSCI_STACK_IN_RAM
99 AT(ADDR(.secure_stack))
101 AT(LOADADDR(.secure_data) + SIZEOF(.secure_data))
104 KEEP(*(.__secure_stack_start))
106 /* Skip addreses for stack */
107 . = . + CONFIG_ARMV7_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE;
109 /* Align end of stack section to page boundary */
110 . = ALIGN(CONSTANT(COMMONPAGESIZE));
112 KEEP(*(.__secure_stack_end))
114 #ifdef CONFIG_ARMV7_SECURE_MAX_SIZE
116 * We are not checking (__secure_end - __secure_start) here,
117 * as these are the load addresses, and do not include the
118 * stack section. Instead, use the end of the stack section
119 * and the start of the text section.
121 ASSERT((. - ADDR(.secure_text)) <= CONFIG_ARMV7_SECURE_MAX_SIZE,
122 "Error: secure section exceeds secure memory size");
126 #ifndef __ARMV7_PSCI_STACK_IN_RAM
127 /* Reset VMA but don't allocate space if we have secure SRAM */
128 . = LOADADDR(.secure_stack);
133 .__secure_end : AT(ADDR(.__secure_end)) {
135 LONG(0x1d1071c); /* Must output something to reset LMA */
140 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
153 KEEP(*(SORT(.u_boot_list*)));
158 .efi_runtime_rel_start :
160 *(.__efi_runtime_rel_start)
165 *(.rel*.efi_runtime.*)
168 .efi_runtime_rel_stop :
170 *(.__efi_runtime_rel_stop)
199 _image_binary_end = .;
202 * Deprecated: this MMU section is used by pxa at present but
203 * should not be used by new boards/CPUs.
211 * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
212 * __bss_base and __bss_limit are for linker only (overlay ordering)
215 .bss_start __rel_dyn_start (OVERLAY) : {
216 KEEP(*(.__bss_start));
220 .bss __bss_base (OVERLAY) : {
226 .bss_end __bss_limit (OVERLAY) : {
230 .dynsym _image_binary_end : { *(.dynsym) }
231 .dynbss : { *(.dynbss) }
232 .dynstr : { *(.dynstr*) }
233 .dynamic : { *(.dynamic*) }
235 .interp : { *(.interp*) }
236 .gnu.hash : { *(.gnu.hash) }
238 .ARM.exidx : { *(.ARM.exidx*) }
239 .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }