blob: 5251b59fbe768bfaab8f179e0b1007edb88c05e0 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Jorge Ramirez-Ortiz4b684a62018-01-10 11:33:50 +01002/*
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)
Jorge Ramirez-Ortiz4b684a62018-01-10 11:33:50 +01008 */
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*)
Alexander Graf7e21fbc2018-06-12 07:48:37 +020023 }
24
25 /* This needs to come before *(.text*) */
26 .efi_runtime : {
27 __efi_runtime_start = .;
28 *(.text.efi_runtime*)
29 *(.rodata.efi_runtime*)
30 *(.data.efi_runtime*)
31 __efi_runtime_stop = .;
32 }
33
34 .text_rest :
35 {
Jorge Ramirez-Ortiz4b684a62018-01-10 11:33:50 +010036 *(.text*)
37 }
38
39 . = ALIGN(8);
40 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
41
42 . = ALIGN(8);
43 .data : {
44 *(.data*)
45 }
46
47 . = ALIGN(8);
48
49 . = .;
50
51 . = ALIGN(8);
Andrew Scull99e2fbc2022-05-30 10:00:04 +000052 __u_boot_list : {
53 KEEP(*(SORT(__u_boot_list*)));
Jorge Ramirez-Ortiz4b684a62018-01-10 11:33:50 +010054 }
55
56 . = ALIGN(8);
57
Jorge Ramirez-Ortiz4b684a62018-01-10 11:33:50 +010058 .efi_runtime_rel : {
59 __efi_runtime_rel_start = .;
Alexander Graf7e21fbc2018-06-12 07:48:37 +020060 *(.rel*.efi_runtime)
61 *(.rel*.efi_runtime.*)
Jorge Ramirez-Ortiz4b684a62018-01-10 11:33:50 +010062 __efi_runtime_rel_stop = .;
63 }
64
65 . = ALIGN(8);
66
67 .image_copy_end :
68 {
69 *(.__image_copy_end)
70 }
71
72 . = ALIGN(8);
73
74 .rel_dyn_start :
75 {
76 *(.__rel_dyn_start)
77 }
78
79 .rela.dyn : {
80 *(.rela*)
81 }
82
83 .rel_dyn_end :
84 {
85 *(.__rel_dyn_end)
86 }
87
88 _end = .;
89
90 . = ALIGN(8);
91
92 .bss_start : {
93 KEEP(*(.__bss_start));
94 }
95
96 .bss : {
97 *(.bss*)
98 . = ALIGN(8);
99 }
100
101 .bss_end : {
102 KEEP(*(.__bss_end));
103 }
104
105 /DISCARD/ : { *(.dynsym) }
106 /DISCARD/ : { *(.dynstr*) }
107 /DISCARD/ : { *(.dynamic*) }
108 /DISCARD/ : { *(.plt*) }
109 /DISCARD/ : { *(.interp*) }
110 /DISCARD/ : { *(.gnu*) }
111}