xref: /rk3399_rockchip-uboot/arch/x86/lib/elf_x86_64_efi.lds (revision 2dcd4e9ee1b6dc0f0ba1d89a7af3987ea47dda23)
1/*
2 * U-Boot EFI linker script
3 *
4 * SPDX-License-Identifier:	BSD-2-Clause
5 *
6 * Modified from usr/lib32/elf_x86_64_efi.lds in gnu-efi
7 */
8
9#include <config.h>
10
11OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
12OUTPUT_ARCH(i386:x86-64)
13ENTRY(_start)
14SECTIONS
15{
16	image_base = .;
17	.hash : { *(.hash) }	/* this MUST come first, EFI expects it */
18	. = ALIGN(4096);
19	.eh_frame : {
20		*(.eh_frame)
21	}
22
23	. = ALIGN(4096);
24
25	.text : {
26		*(.text)
27		*(.text.*)
28		*(.gnu.linkonce.t.*)
29	}
30
31	. = ALIGN(4096);
32
33	.reloc : {
34		*(.reloc)
35	}
36
37	. = ALIGN(4096);
38
39	.data : {
40		*(.rodata*)
41		*(.got.plt)
42		*(.got)
43		*(.data*)
44		*(.sdata)
45		/* the EFI loader doesn't seem to like a .bss section, so we stick
46		 * it all into .data: */
47		*(.sbss)
48		*(.scommon)
49		*(.dynbss)
50		*(.bss)
51		*(COMMON)
52		*(.rel.local)
53
54		/* U-Boot lists and device tree */
55		. = ALIGN(8);
56		*(SORT(.u_boot_list*));
57		. = ALIGN(8);
58		*(.dtb*);
59	}
60
61	. = ALIGN(4096);
62	.dynamic : { *(.dynamic) }
63	. = ALIGN(4096);
64
65	.rela : {
66		*(.rela.data*)
67		*(.rela.got)
68		*(.rela.stab)
69	}
70
71	. = ALIGN(4096);
72	.dynsym : { *(.dynsym) }
73	. = ALIGN(4096);
74	.dynstr : { *(.dynstr) }
75	. = ALIGN(4096);
76	.ignored.reloc : {
77		*(.rela.reloc)
78		*(.eh_frame)
79		*(.note.GNU-stack)
80	}
81
82	.comment 0 : { *(.comment) }
83}
84