blob: 00a6d8691211a4fa6ff7a97539e2c49d394aaa21 [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{
Simon Glass98463902022-10-20 18:22:39 -060014#ifdef CONFIG_TEXT_BASE
15 . = CONFIG_TEXT_BASE; /* Location of bootcode in flash */
Simon Glasse16c47f2021-11-03 21:09:07 -060016#endif
Simon Glass3742d7a2017-01-16 07:04:01 -070017 __text_start = .;
Alexander Graf7e21fbc2018-06-12 07:48:37 +020018
19 .text.start : { *(.text.start); }
20
Alexander Graf42a3d422018-07-11 01:39:31 +020021 .__efi_runtime_start : {
22 *(.__efi_runtime_start)
23 }
24
25 .efi_runtime : {
26 *(.text.efi_runtime*)
27 *(.rodata.efi_runtime*)
28 *(.data.efi_runtime*)
29 }
30
31 .__efi_runtime_stop : {
32 *(.__efi_runtime_stop)
33 }
34
Simon Glass3742d7a2017-01-16 07:04:01 -070035 .text : { *(.text*); }
36
37 . = ALIGN(4);
38
39 . = ALIGN(4);
Andrew Scull99e2fbc2022-05-30 10:00:04 +000040 __u_boot_list : {
41 KEEP(*(SORT(__u_boot_list*)));
Simon Glass3742d7a2017-01-16 07:04:01 -070042 }
43
44 . = ALIGN(4);
Alexander Graf42a3d422018-07-11 01:39:31 +020045 .rodata : {
46 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
47 KEEP(*(.rodata.efi.init));
48 }
Simon Glass3742d7a2017-01-16 07:04:01 -070049
50 . = ALIGN(4);
51 .data : { *(.data*) }
52
53 . = ALIGN(4);
54 .hash : { *(.hash*) }
55
56 . = ALIGN(4);
57 .got : { *(.got*) }
58
Alexander Graf42a3d422018-07-11 01:39:31 +020059 .efi_runtime_rel_start :
60 {
61 *(.__efi_runtime_rel_start)
62 }
63
64 .efi_runtime_rel : {
65 *(.rel*.efi_runtime)
66 *(.rel*.efi_runtime.*)
67 }
68
69 .efi_runtime_rel_stop :
70 {
71 *(.__efi_runtime_rel_stop)
72 }
73
Simon Glass3742d7a2017-01-16 07:04:01 -070074 . = ALIGN(4);
75 __data_end = .;
76 __init_end = .;
77
78 . = ALIGN(4);
79 .dynsym : { *(.dynsym*) }
80
81 . = ALIGN(4);
82 __rel_dyn_start = .;
83 .rela.dyn : {
84 *(.rela*)
85 }
86 __rel_dyn_end = .;
87 . = ALIGN(4);
88
89 .dynamic : { *(.dynamic) }
90
91 . = ALIGN(4);
92 _end = .;
93
94 .bss __rel_dyn_start (OVERLAY) : {
95 __bss_start = .;
Alexander Graf6331cb22018-08-20 14:17:41 +020096 *(.bss*)
Simon Glass3742d7a2017-01-16 07:04:01 -070097 *(COM*)
98 . = ALIGN(4);
99 __bss_end = .;
100 }
101
102 /DISCARD/ : { *(.dynsym) }
103 /DISCARD/ : { *(.dynstr*) }
104 /DISCARD/ : { *(.dynamic*) }
105 /DISCARD/ : { *(.plt*) }
106 /DISCARD/ : { *(.interp*) }
107 /DISCARD/ : { *(.gnu*) }
Bin Meng6fbe06a2021-06-18 15:09:30 +0800108 /DISCARD/ : { *(.note.gnu.property) }
Simon Glass3742d7a2017-01-16 07:04:01 -0700109}