blob: 47cce1db979eab09d02ecfd7464fd4cbeaa094db [file] [log] [blame]
Simon Glass61378fd2016-11-07 08:47:11 -07001/*
2 * U-Boot aarch64 EFI linker script
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 *
6 * Modified from elf_aarch64_efi.lds in gnu-efi
7 */
8
9OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
10OUTPUT_ARCH(aarch64)
11ENTRY(_start)
12SECTIONS
13{
14 .text 0x0 : {
15 _text = .;
16 *(.text.head)
17 *(.text)
18 *(.text.*)
19 *(.gnu.linkonce.t.*)
20 *(.srodata)
21 *(.rodata*)
22 . = ALIGN(16);
23 }
24 _etext = .;
25 _text_size = . - _text;
26 .dynamic : { *(.dynamic) }
27 .data : {
28 _data = .;
29 *(.sdata)
30 *(.data)
31 *(.data1)
32 *(.data.*)
33 *(.got.plt)
34 *(.got)
35
36 /*
37 * The EFI loader doesn't seem to like a .bss section, so we
38 * stick it all into .data:
39 */
40 . = ALIGN(16);
41 _bss = .;
42 *(.sbss)
43 *(.scommon)
44 *(.dynbss)
45 *(.bss)
46 *(.bss.*)
47 *(COMMON)
48 . = ALIGN(16);
49 _bss_end = .;
50 _edata = .;
51 }
52 .rela.dyn : { *(.rela.dyn) }
53 .rela.plt : { *(.rela.plt) }
54 .rela.got : { *(.rela.got) }
55 .rela.data : { *(.rela.data) *(.rela.data*) }
56 _data_size = . - _etext;
57
58 . = ALIGN(4096);
59 .dynsym : { *(.dynsym) }
60 . = ALIGN(4096);
61 .dynstr : { *(.dynstr) }
62 . = ALIGN(4096);
63 .note.gnu.build-id : { *(.note.gnu.build-id) }
64 /DISCARD/ : {
65 *(.rel.reloc)
66 *(.eh_frame)
67 *(.note.GNU-stack)
68 }
69 .comment 0 : { *(.comment) }
70}