1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * David Feng <fenghua@phytium.com.cn>
7 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
13 OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
18 #ifdef CONFIG_ARMV8_SECURE_BASE
19 /DISCARD/ : { *(.rela._secure*) }
26 *(.__image_copy_start)
27 CPUDIR/start.o (.text*)
30 /* This needs to come before *(.text*) */
32 __efi_runtime_start = .;
34 *(.rodata.efi_runtime*)
36 __efi_runtime_stop = .;
44 #ifdef CONFIG_ARMV8_PSCI
46 #ifndef CONFIG_ARMV8_SECURE_BASE
47 ALIGN(CONSTANT(COMMONPAGESIZE))
50 KEEP(*(.__secure_start))
53 #ifndef CONFIG_ARMV8_SECURE_BASE
54 #define CONFIG_ARMV8_SECURE_BASE
55 #define __ARMV8_PSCI_STACK_IN_RAM
57 .secure_text CONFIG_ARMV8_SECURE_BASE :
58 AT(ADDR(.__secure_start) + SIZEOF(.__secure_start))
62 __secure_svc_tbl_start = .;
63 KEEP(*(._secure_svc_tbl_entries))
64 __secure_svc_tbl_end = .;
67 .secure_data : AT(LOADADDR(.secure_text) + SIZEOF(.secure_text))
72 .secure_stack ALIGN(ADDR(.secure_data) + SIZEOF(.secure_data),
73 CONSTANT(COMMONPAGESIZE)) (NOLOAD) :
74 #ifdef __ARMV8_PSCI_STACK_IN_RAM
75 AT(ADDR(.secure_stack))
77 AT(LOADADDR(.secure_data) + SIZEOF(.secure_data))
80 KEEP(*(.__secure_stack_start))
82 . = . + CONFIG_ARMV8_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE;
84 . = ALIGN(CONSTANT(COMMONPAGESIZE));
86 KEEP(*(.__secure_stack_end))
89 #ifndef __ARMV8_PSCI_STACK_IN_RAM
90 . = LOADADDR(.secure_stack);
93 .__secure_end : AT(ADDR(.__secure_end)) {
94 KEEP(*(.__secure_end))
95 LONG(0x1d1071c); /* Must output something to reset LMA */
100 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
113 KEEP(*(SORT(.u_boot_list*)));
119 __efi_runtime_rel_start = .;
121 *(.rel*.efi_runtime.*)
122 __efi_runtime_rel_stop = .;
153 KEEP(*(.__bss_start));
165 /DISCARD/ : { *(.dynsym) }
166 /DISCARD/ : { *(.dynstr*) }
167 /DISCARD/ : { *(.dynamic*) }
168 /DISCARD/ : { *(.plt*) }
169 /DISCARD/ : { *(.interp*) }
170 /DISCARD/ : { *(.gnu*) }
172 #ifdef CONFIG_LINUX_KERNEL_IMAGE_HEADER
173 #include "linux-kernel-image-header-vars.h"