blob: 53c56043a9ebfaee71a898ba1c8c18fbb012b4bc [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{
14#ifndef CONFIG_CMDLINE
Andrew Scull5a9095c2022-05-30 10:00:04 +000015 /DISCARD/ : { *(__u_boot_list_2_cmd_*) }
Simon Glassc74f9dc2017-01-16 07:04:01 -070016#endif
17
Simon Glass49a643b2021-11-03 21:09:07 -060018#ifdef CONFIG_SYS_TEXT_BASE
Simon Glassc74f9dc2017-01-16 07:04:01 -070019 . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */
Simon Glass49a643b2021-11-03 21:09:07 -060020#endif
Simon Glassc74f9dc2017-01-16 07:04:01 -070021 __text_start = .;
Alexander Graf94a10f22018-06-12 07:48:37 +020022
23 .text.start : { *(.text.start); }
24
Alexander Graf2133bc52018-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 Glassc74f9dc2017-01-16 07:04:01 -070039 .text : { *(.text*); }
40
41 . = ALIGN(4);
42
43 . = ALIGN(4);
Andrew Scull5a9095c2022-05-30 10:00:04 +000044 __u_boot_list : {
45 KEEP(*(SORT(__u_boot_list*)));
Simon Glassc74f9dc2017-01-16 07:04:01 -070046 }
47
48 . = ALIGN(4);
Alexander Graf2133bc52018-07-11 01:39:31 +020049 .rodata : {
50 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
51 KEEP(*(.rodata.efi.init));
52 }
Simon Glassc74f9dc2017-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 Graf2133bc52018-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 Glassc74f9dc2017-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 Graf61c76782018-08-20 14:17:41 +0200100 *(.bss*)
Simon Glassc74f9dc2017-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 Meng3eb15f52021-06-18 15:09:30 +0800112 /DISCARD/ : { *(.note.gnu.property) }
Simon Glassc74f9dc2017-01-16 07:04:01 -0700113}