2 * Copyright (c) 2004-2008 Texas Instruments
5 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
7 * SPDX-License-Identifier: GPL-2.0+
12 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
18 * Discard the relocation entries for secure text.
19 * The secure code is bundled with u-boot image, so there will
20 * be relocations entries for the secure code, since we use
21 * "-mword-relocations" to compile and "-pie" to link into the
22 * final image. We do not need the relocation entries for secure
23 * code, because secure code will not be relocated, it only needs
24 * to be copied from loading address to CONFIG_ARMV7_SECURE_BASE,
25 * which is the linking and running address for secure code.
26 * If keep the relocation entries in .rel.dyn section,
27 * "relocation offset + linking address" may locates into an
28 * address that is reserved by SoC, then will trigger data abort.
30 * The reason that move .rel._secure at the beginning, is to
31 * avoid hole in the final image.
33 /DISCARD/ : { *(.rel._secure*) }
39 *(.__image_copy_start)
41 CPUDIR/start.o (.text*)
45 #ifdef CONFIG_ARMV7_NONSEC
47 #ifndef CONFIG_ARMV7_SECURE_BASE
48 #define CONFIG_ARMV7_SECURE_BASE
56 .secure_text CONFIG_ARMV7_SECURE_BASE :
57 AT(ADDR(.__secure_start) + SIZEOF(.__secure_start))
62 . = LOADADDR(.__secure_start) +
63 SIZEOF(.__secure_start) +
67 .__secure_end : AT(__secure_end_lma) {
69 LONG(0x1d1071c); /* Must output something to reset LMA */
74 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
87 KEEP(*(SORT(.u_boot_list*)));
116 _image_binary_end = .;
119 * Deprecated: this MMU section is used by pxa at present but
120 * should not be used by new boards/CPUs.
128 * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
129 * __bss_base and __bss_limit are for linker only (overlay ordering)
132 .bss_start __rel_dyn_start (OVERLAY) : {
133 KEEP(*(.__bss_start));
137 .bss __bss_base (OVERLAY) : {
143 .bss_end __bss_limit (OVERLAY) : {
147 .dynsym _image_binary_end : { *(.dynsym) }
148 .dynbss : { *(.dynbss) }
149 .dynstr : { *(.dynstr*) }
150 .dynamic : { *(.dynamic*) }
152 .interp : { *(.interp*) }
153 .gnu.hash : { *(.gnu.hash) }
155 .ARM.exidx : { *(.ARM.exidx*) }
156 .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }