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))
63 .secure_data : AT(LOADADDR(.secure_text) + SIZEOF(.secure_text))
68 .secure_stack ALIGN(ADDR(.secure_data) + SIZEOF(.secure_data),
69 CONSTANT(COMMONPAGESIZE)) (NOLOAD) :
70 #ifdef __ARMV8_PSCI_STACK_IN_RAM
71 AT(ADDR(.secure_stack))
73 AT(LOADADDR(.secure_data) + SIZEOF(.secure_data))
76 KEEP(*(.__secure_stack_start))
78 . = . + CONFIG_ARMV8_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE;
80 . = ALIGN(CONSTANT(COMMONPAGESIZE));
82 KEEP(*(.__secure_stack_end))
85 #ifndef __ARMV8_PSCI_STACK_IN_RAM
86 . = LOADADDR(.secure_stack);
89 .__secure_end : AT(ADDR(.__secure_end)) {
90 KEEP(*(.__secure_end))
91 LONG(0x1d1071c); /* Must output something to reset LMA */
96 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
109 KEEP(*(SORT(.u_boot_list*)));
115 __efi_runtime_rel_start = .;
117 *(.rel*.efi_runtime.*)
118 __efi_runtime_rel_stop = .;
149 KEEP(*(.__bss_start));
161 /DISCARD/ : { *(.dynsym) }
162 /DISCARD/ : { *(.dynstr*) }
163 /DISCARD/ : { *(.dynamic*) }
164 /DISCARD/ : { *(.plt*) }
165 /DISCARD/ : { *(.interp*) }
166 /DISCARD/ : { *(.gnu*) }
168 #ifdef CONFIG_LINUX_KERNEL_IMAGE_HEADER
169 #include "linux-kernel-image-header-vars.h"