2 * Copyright (c) 2004-2008 Texas Instruments
5 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
7 * SPDX-License-Identifier: GPL-2.0+
13 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
18 #ifndef CONFIG_CMDLINE
19 /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
21 #if defined(CONFIG_ARMV7_SECURE_BASE) && defined(CONFIG_ARMV7_NONSEC)
23 * If CONFIG_ARMV7_SECURE_BASE is true, secure code will not
24 * bundle with u-boot, and code offsets are fixed. Secure zone
25 * only needs to be copied from the loading address to
26 * CONFIG_ARMV7_SECURE_BASE, which is the linking and running
27 * address for secure code.
29 * If CONFIG_ARMV7_SECURE_BASE is undefined, the secure zone will
30 * be included in u-boot address space, and some absolute address
31 * were used in secure code. The absolute addresses of the secure
32 * code also needs to be relocated along with the accompanying u-boot
35 * So DISCARD is only for CONFIG_ARMV7_SECURE_BASE.
37 /DISCARD/ : { *(.rel._secure*) }
44 *(.__image_copy_start)
46 CPUDIR/start.o (.text*)
50 #ifdef CONFIG_ARMV7_NONSEC
52 /* Align the secure section only if we're going to use it in situ */
54 #ifndef CONFIG_ARMV7_SECURE_BASE
55 ALIGN(CONSTANT(COMMONPAGESIZE))
58 KEEP(*(.__secure_start))
61 #ifndef CONFIG_ARMV7_SECURE_BASE
62 #define CONFIG_ARMV7_SECURE_BASE
63 #define __ARMV7_PSCI_STACK_IN_RAM
66 .secure_text CONFIG_ARMV7_SECURE_BASE :
67 AT(ADDR(.__secure_start) + SIZEOF(.__secure_start))
72 .secure_data : AT(LOADADDR(.secure_text) + SIZEOF(.secure_text))
77 #ifdef CONFIG_ARMV7_PSCI
78 .secure_stack ALIGN(ADDR(.secure_data) + SIZEOF(.secure_data),
79 CONSTANT(COMMONPAGESIZE)) (NOLOAD) :
80 #ifdef __ARMV7_PSCI_STACK_IN_RAM
81 AT(ADDR(.secure_stack))
83 AT(LOADADDR(.secure_data) + SIZEOF(.secure_data))
86 KEEP(*(.__secure_stack_start))
88 /* Skip addreses for stack */
89 . = . + CONFIG_ARMV7_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE;
91 /* Align end of stack section to page boundary */
92 . = ALIGN(CONSTANT(COMMONPAGESIZE));
94 KEEP(*(.__secure_stack_end))
96 #ifdef CONFIG_ARMV7_SECURE_MAX_SIZE
98 * We are not checking (__secure_end - __secure_start) here,
99 * as these are the load addresses, and do not include the
100 * stack section. Instead, use the end of the stack section
101 * and the start of the text section.
103 ASSERT((. - ADDR(.secure_text)) <= CONFIG_ARMV7_SECURE_MAX_SIZE,
104 "Error: secure section exceeds secure memory size");
108 #ifndef __ARMV7_PSCI_STACK_IN_RAM
109 /* Reset VMA but don't allocate space if we have secure SRAM */
110 . = LOADADDR(.secure_stack);
115 .__secure_end : AT(ADDR(.__secure_end)) {
117 LONG(0x1d1071c); /* Must output something to reset LMA */
122 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
135 KEEP(*(SORT(.u_boot_list*)));
140 .__efi_runtime_start : {
141 *(.__efi_runtime_start)
149 .__efi_runtime_stop : {
150 *(.__efi_runtime_stop)
153 .efi_runtime_rel_start :
155 *(.__efi_runtime_rel_start)
159 *(.relefi_runtime_text)
160 *(.relefi_runtime_data)
163 .efi_runtime_rel_stop :
165 *(.__efi_runtime_rel_stop)
194 _image_binary_end = .;
197 * Deprecated: this MMU section is used by pxa at present but
198 * should not be used by new boards/CPUs.
206 * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
207 * __bss_base and __bss_limit are for linker only (overlay ordering)
210 .bss_start __rel_dyn_start (OVERLAY) : {
211 KEEP(*(.__bss_start));
215 .bss __bss_base (OVERLAY) : {
221 .bss_end __bss_limit (OVERLAY) : {
225 .dynsym _image_binary_end : { *(.dynsym) }
226 .dynbss : { *(.dynbss) }
227 .dynstr : { *(.dynstr*) }
228 .dynamic : { *(.dynamic*) }
230 .interp : { *(.interp*) }
231 .gnu.hash : { *(.gnu.hash) }
233 .ARM.exidx : { *(.ARM.exidx*) }
234 .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }