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