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_stack ALIGN(ADDR(.secure_text) + SIZEOF(.secure_text),
73 CONSTANT(COMMONPAGESIZE)) (NOLOAD) :
74 #ifdef __ARMV7_PSCI_STACK_IN_RAM
75 AT(ADDR(.secure_stack))
77 AT(LOADADDR(.secure_text) + SIZEOF(.secure_text))
80 KEEP(*(.__secure_stack_start))
82 /* Skip addreses for stack */
83 . = . + CONFIG_ARMV7_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE;
85 /* Align end of stack section to page boundary */
86 . = ALIGN(CONSTANT(COMMONPAGESIZE));
88 KEEP(*(.__secure_stack_end))
91 #ifndef __ARMV7_PSCI_STACK_IN_RAM
92 /* Reset VMA but don't allocate space if we have secure SRAM */
93 . = LOADADDR(.secure_stack);
96 .__secure_end : AT(ADDR(.__secure_end)) {
98 LONG(0x1d1071c); /* Must output something to reset LMA */
103 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
116 KEEP(*(SORT(.u_boot_list*)));
121 .__efi_runtime_start : {
122 *(.__efi_runtime_start)
130 .__efi_runtime_stop : {
131 *(.__efi_runtime_stop)
134 .efi_runtime_rel_start :
136 *(.__efi_runtime_rel_start)
140 *(.relefi_runtime_text)
141 *(.relefi_runtime_data)
144 .efi_runtime_rel_stop :
146 *(.__efi_runtime_rel_stop)
175 _image_binary_end = .;
178 * Deprecated: this MMU section is used by pxa at present but
179 * should not be used by new boards/CPUs.
187 * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
188 * __bss_base and __bss_limit are for linker only (overlay ordering)
191 .bss_start __rel_dyn_start (OVERLAY) : {
192 KEEP(*(.__bss_start));
196 .bss __bss_base (OVERLAY) : {
202 .bss_end __bss_limit (OVERLAY) : {
206 .dynsym _image_binary_end : { *(.dynsym) }
207 .dynbss : { *(.dynbss) }
208 .dynstr : { *(.dynstr*) }
209 .dynamic : { *(.dynamic*) }
211 .interp : { *(.interp*) }
212 .gnu.hash : { *(.gnu.hash) }
214 .ARM.exidx : { *(.ARM.exidx*) }
215 .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }