xref: /openbmc/u-boot/arch/x86/cpu/u-boot.lds (revision 8ee59472)
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	.text  : { *(.text*); }
21
22	. = ALIGN(4);
23
24	. = ALIGN(4);
25	.u_boot_list : {
26		KEEP(*(SORT(.u_boot_list*)));
27	}
28
29	. = ALIGN(4);
30	.rodata : {
31		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
32		KEEP(*(.rodata.efi.init));
33	}
34
35	. = ALIGN(4);
36	.data : { *(.data*) }
37
38	. = ALIGN(4);
39	.hash : { *(.hash*) }
40
41	. = ALIGN(4);
42	.got : { *(.got*) }
43
44	. = ALIGN(4);
45
46	.__efi_runtime_start : {
47		*(.__efi_runtime_start)
48	}
49
50	.efi_runtime : {
51		*(efi_runtime_text)
52		*(efi_runtime_data)
53	}
54
55	.__efi_runtime_stop : {
56		*(.__efi_runtime_stop)
57	}
58
59	.efi_runtime_rel_start :
60	{
61		*(.__efi_runtime_rel_start)
62	}
63
64	.efi_runtime_rel : {
65		*(.relefi_runtime_text)
66		*(.relefi_runtime_data)
67	}
68
69	.efi_runtime_rel_stop :
70	{
71		*(.__efi_runtime_rel_stop)
72	}
73
74	. = ALIGN(4);
75
76	__data_end = .;
77	__init_end = .;
78
79	. = ALIGN(4);
80	.dynsym : { *(.dynsym*) }
81
82	. = ALIGN(4);
83	__rel_dyn_start = .;
84	.rel.dyn : {
85		*(.rel*)
86	}
87	__rel_dyn_end = .;
88	. = ALIGN(4);
89	_end = .;
90
91	.bss __rel_dyn_start (OVERLAY) : {
92		__bss_start = .;
93		*(.bss)
94		*(COM*)
95		. = ALIGN(4);
96		__bss_end = .;
97	}
98
99	/DISCARD/ : { *(.dynstr*) }
100	/DISCARD/ : { *(.dynamic*) }
101	/DISCARD/ : { *(.plt*) }
102	/DISCARD/ : { *(.interp*) }
103	/DISCARD/ : { *(.gnu*) }
104
105#ifdef CONFIG_X86_16BIT_INIT
106	/*
107	 * The following expressions place the 16-bit Real-Mode code and
108	 * Reset Vector at the end of the Flash ROM
109	 */
110	. = START_16 - RESET_SEG_START;
111	.start16 : AT (START_16) {
112		KEEP(*(.start16));
113	}
114
115	. = RESET_VEC_LOC - RESET_SEG_START;
116	.resetvec : AT (RESET_VEC_LOC) {
117		KEEP(*(.resetvec));
118	}
119#endif
120
121}
122