blob: 00a6d8691211a4fa6ff7a97539e2c49d394aaa21 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glassc74f9dc2017-01-16 07:04:01 -07002/*
3 * (C) Copyright 2002
4 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
Simon Glassc74f9dc2017-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 Glass72cc5382022-10-20 18:22:39 -060014#ifdef CONFIG_TEXT_BASE
15 . = CONFIG_TEXT_BASE; /* Location of bootcode in flash */
Simon Glass49a643b2021-11-03 21:09:07 -060016#endif
Simon Glassc74f9dc2017-01-16 07:04:01 -070017 __text_start = .;
Alexander Graf94a10f22018-06-12 07:48:37 +020018
19 .text.start : { *(.text.start); }
20
Alexander Graf2133bc52018-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 Glassc74f9dc2017-01-16 07:04:01 -070035 .text : { *(.text*); }
36
37 . = ALIGN(4);
38
39 . = ALIGN(4);
Andrew Scull5a9095c2022-05-30 10:00:04 +000040 __u_boot_list : {
41 KEEP(*(SORT(__u_boot_list*)));
Simon Glassc74f9dc2017-01-16 07:04:01 -070042 }
43
44 . = ALIGN(4);
Alexander Graf2133bc52018-07-11 01:39:31 +020045 .rodata : {
46 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
47 KEEP(*(.rodata.efi.init));
48 }
Simon Glassc74f9dc2017-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 Graf2133bc52018-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 Glassc74f9dc2017-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 Graf61c76782018-08-20 14:17:41 +020096 *(.bss*)
Simon Glassc74f9dc2017-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 Meng3eb15f52021-06-18 15:09:30 +0800108 /DISCARD/ : { *(.note.gnu.property) }
Simon Glassc74f9dc2017-01-16 07:04:01 -0700109}