Prepare v2023.10
[platform/kernel/u-boot.git] / arch / x86 / cpu / u-boot-64.lds
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2002
4  * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
5  */
6
7 #include <config.h>
8 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
9 OUTPUT_ARCH(i386:x86-64)
10 ENTRY(_start)
11
12 SECTIONS
13 {
14 #ifndef CONFIG_CMDLINE
15         /DISCARD/ : { *(__u_boot_list_2_cmd_*) }
16 #endif
17
18 #ifdef CONFIG_TEXT_BASE
19         . = CONFIG_TEXT_BASE;   /* Location of bootcode in flash */
20 #endif
21         __text_start = .;
22
23         .text.start : { *(.text.start); }
24
25         .__efi_runtime_start : {
26                 *(.__efi_runtime_start)
27         }
28
29         .efi_runtime : {
30                 *(.text.efi_runtime*)
31                 *(.rodata.efi_runtime*)
32                 *(.data.efi_runtime*)
33         }
34
35         .__efi_runtime_stop : {
36                 *(.__efi_runtime_stop)
37         }
38
39         .text  : { *(.text*); }
40
41         . = ALIGN(4);
42
43         . = ALIGN(4);
44         __u_boot_list : {
45                 KEEP(*(SORT(__u_boot_list*)));
46         }
47
48         . = ALIGN(4);
49         .rodata : {
50                 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
51                 KEEP(*(.rodata.efi.init));
52         }
53
54         . = ALIGN(4);
55         .data : { *(.data*) }
56
57         . = ALIGN(4);
58         .hash : { *(.hash*) }
59
60         . = ALIGN(4);
61         .got : { *(.got*) }
62
63         .efi_runtime_rel_start :
64         {
65                 *(.__efi_runtime_rel_start)
66         }
67
68         .efi_runtime_rel : {
69                 *(.rel*.efi_runtime)
70                 *(.rel*.efi_runtime.*)
71         }
72
73         .efi_runtime_rel_stop :
74         {
75                 *(.__efi_runtime_rel_stop)
76         }
77
78         . = ALIGN(4);
79         __data_end = .;
80         __init_end = .;
81
82         . = ALIGN(4);
83         .dynsym : { *(.dynsym*) }
84
85         . = ALIGN(4);
86         __rel_dyn_start = .;
87         .rela.dyn : {
88                 *(.rela*)
89         }
90         __rel_dyn_end = .;
91         . = ALIGN(4);
92
93         .dynamic : { *(.dynamic) }
94
95         . = ALIGN(4);
96         _end = .;
97
98         .bss __rel_dyn_start (OVERLAY) : {
99                 __bss_start = .;
100                 *(.bss*)
101                 *(COM*)
102                 . = ALIGN(4);
103                 __bss_end = .;
104         }
105
106         /DISCARD/ : { *(.dynsym) }
107         /DISCARD/ : { *(.dynstr*) }
108         /DISCARD/ : { *(.dynamic*) }
109         /DISCARD/ : { *(.plt*) }
110         /DISCARD/ : { *(.interp*) }
111         /DISCARD/ : { *(.gnu*) }
112         /DISCARD/ : { *(.note.gnu.property) }
113 }