1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Override linker script for fastboot-readable images
4 *
5 * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
6 *
7 * Based on arch/arm/cpu/armv8/u-boot.lds (Just add header)
8 */
9
10OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
11OUTPUT_ARCH(aarch64)
12ENTRY(_arm64_header)
13SECTIONS
14{
15	. = 0x00000000;
16
17	. = ALIGN(8);
18	.text :
19	{
20		*(.__image_copy_start)
21		board/qualcomm/dragonboard820c/head.o (.text*)
22		CPUDIR/start.o (.text*)
23		*(.text*)
24	}
25
26	. = ALIGN(8);
27	.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
28
29	. = ALIGN(8);
30	.data : {
31		*(.data*)
32	}
33
34	. = ALIGN(8);
35
36	. = .;
37
38	. = ALIGN(8);
39	.u_boot_list : {
40		KEEP(*(SORT(.u_boot_list*)));
41	}
42
43	. = ALIGN(8);
44
45	.efi_runtime : {
46                __efi_runtime_start = .;
47		*(efi_runtime_text)
48		*(efi_runtime_data)
49                __efi_runtime_stop = .;
50	}
51
52	.efi_runtime_rel : {
53                __efi_runtime_rel_start = .;
54		*(.relaefi_runtime_text)
55		*(.relaefi_runtime_data)
56                __efi_runtime_rel_stop = .;
57	}
58
59	. = ALIGN(8);
60
61	.image_copy_end :
62	{
63		*(.__image_copy_end)
64	}
65
66	. = ALIGN(8);
67
68	.rel_dyn_start :
69	{
70		*(.__rel_dyn_start)
71	}
72
73	.rela.dyn : {
74		*(.rela*)
75	}
76
77	.rel_dyn_end :
78	{
79		*(.__rel_dyn_end)
80	}
81
82	_end = .;
83
84	. = ALIGN(8);
85
86	.bss_start : {
87		KEEP(*(.__bss_start));
88	}
89
90	.bss : {
91		*(.bss*)
92		 . = ALIGN(8);
93	}
94
95	.bss_end : {
96		KEEP(*(.__bss_end));
97	}
98
99	/DISCARD/ : { *(.dynsym) }
100	/DISCARD/ : { *(.dynstr*) }
101	/DISCARD/ : { *(.dynamic*) }
102	/DISCARD/ : { *(.plt*) }
103	/DISCARD/ : { *(.interp*) }
104	/DISCARD/ : { *(.gnu*) }
105}
106