blob: 92a30c2a387d25d0361aa53efe814b6cd12bd0ac [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass3742d7a2017-01-16 07:04:01 -07002/*
3 * (C) Copyright 2002
4 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
Simon Glass3742d7a2017-01-16 07:04:01 -07005 */
6
7#include <config.h>
8OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
9OUTPUT_ARCH(i386:x86-64)
10ENTRY(_start)
11
12SECTIONS
13{
14#ifndef CONFIG_CMDLINE
15 /DISCARD/ : { *(.u_boot_list_2_cmd_*) }
16#endif
17
Simon Glasse16c47f2021-11-03 21:09:07 -060018#ifdef CONFIG_SYS_TEXT_BASE
Simon Glass3742d7a2017-01-16 07:04:01 -070019 . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
Simon Glasse16c47f2021-11-03 21:09:07 -060020#endif
Simon Glass3742d7a2017-01-16 07:04:01 -070021 __text_start = .;
Alexander Graf7e21fbc2018-06-12 07:48:37 +020022
23 .text.start : { *(.text.start); }
24
Alexander Graf42a3d422018-07-11 01:39:31 +020025 .__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
Simon Glass3742d7a2017-01-16 07:04:01 -070039 .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);
Alexander Graf42a3d422018-07-11 01:39:31 +020049 .rodata : {
50 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
51 KEEP(*(.rodata.efi.init));
52 }
Simon Glass3742d7a2017-01-16 07:04:01 -070053
54 . = ALIGN(4);
55 .data : { *(.data*) }
56
57 . = ALIGN(4);
58 .hash : { *(.hash*) }
59
60 . = ALIGN(4);
61 .got : { *(.got*) }
62
Alexander Graf42a3d422018-07-11 01:39:31 +020063 .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
Simon Glass3742d7a2017-01-16 07:04:01 -070078 . = 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 = .;
Alexander Graf6331cb22018-08-20 14:17:41 +0200100 *(.bss*)
Simon Glass3742d7a2017-01-16 07:04:01 -0700101 *(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*) }
Bin Meng6fbe06a2021-06-18 15:09:30 +0800112 /DISCARD/ : { *(.note.gnu.property) }
Simon Glass3742d7a2017-01-16 07:04:01 -0700113}