xref: /openbmc/u-boot/arch/x86/cpu/u-boot.lds (revision 7d2a0534)
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>
8OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
9OUTPUT_ARCH(i386)
10ENTRY(_start)
11
12SECTIONS
13{
14#ifndef CONFIG_CMDLINE
15	/DISCARD/ : { *(.u_boot_list_2_cmd_*) }
16#endif
17
18	. = CONFIG_SYS_TEXT_BASE;	/* Location of bootcode in flash */
19	__text_start = .;
20
21	.text.start : { *(.text.start); }
22
23	.__efi_runtime_start : {
24		*(.__efi_runtime_start)
25	}
26
27	.efi_runtime : {
28		*(.text.efi_runtime*)
29		*(.rodata.efi_runtime*)
30		*(.data.efi_runtime*)
31	}
32
33	.__efi_runtime_stop : {
34		*(.__efi_runtime_stop)
35	}
36
37	.text  : { *(.text*); }
38
39	. = ALIGN(4);
40
41	. = ALIGN(4);
42	.u_boot_list : {
43		KEEP(*(SORT(.u_boot_list*)));
44	}
45
46	. = ALIGN(4);
47	.rodata : {
48		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
49		KEEP(*(.rodata.efi.init));
50	}
51
52	. = ALIGN(4);
53	.data : { *(.data*) }
54
55	. = ALIGN(4);
56	.hash : { *(.hash*) }
57
58	. = ALIGN(4);
59	.got : { *(.got*) }
60
61	. = ALIGN(4);
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
80	__data_end = .;
81	__init_end = .;
82
83	. = ALIGN(4);
84	.dynsym : { *(.dynsym*) }
85
86	. = ALIGN(4);
87	__rel_dyn_start = .;
88	.rel.dyn : {
89		*(.rel*)
90	}
91	__rel_dyn_end = .;
92	. = ALIGN(4);
93	_end = .;
94
95	.bss __rel_dyn_start (OVERLAY) : {
96		__bss_start = .;
97		*(.bss*)
98		*(COM*)
99		. = ALIGN(4);
100		__bss_end = .;
101	}
102
103	/DISCARD/ : { *(.dynstr*) }
104	/DISCARD/ : { *(.dynamic*) }
105	/DISCARD/ : { *(.plt*) }
106	/DISCARD/ : { *(.interp*) }
107	/DISCARD/ : { *(.gnu*) }
108
109#ifdef CONFIG_X86_16BIT_INIT
110	/*
111	 * The following expressions place the 16-bit Real-Mode code and
112	 * Reset Vector at the end of the Flash ROM
113	 */
114	. = START_16 - RESET_SEG_START;
115	.start16 : AT (START_16) {
116		KEEP(*(.start16));
117	}
118
119	. = RESET_VEC_LOC - RESET_SEG_START;
120	.resetvec : AT (RESET_VEC_LOC) {
121		KEEP(*(.resetvec));
122	}
123#endif
124
125}
126