xref: /openbmc/u-boot/arch/x86/cpu/u-boot-spl.lds (revision 90c08fa0)
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_SPL_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 : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
31
32	. = ALIGN(4);
33	.data : { *(.data*) }
34
35	. = ALIGN(4);
36	__data_end = .;
37	__init_end = .;
38
39        _image_binary_end = .;
40
41	. = 0x120000;
42	.bss (OVERLAY) : {
43		__bss_start = .;
44		*(.bss*)
45		*(COM*)
46		. = ALIGN(4);
47		__bss_end = .;
48	}
49	__bss_size = __bss_end - __bss_start;
50
51	/DISCARD/ : { *(.dynstr*) }
52	/DISCARD/ : { *(.dynamic*) }
53	/DISCARD/ : { *(.plt*) }
54	/DISCARD/ : { *(.interp*) }
55	/DISCARD/ : { *(.gnu*) }
56
57#ifdef CONFIG_SPL_X86_16BIT_INIT
58	/*
59	 * The following expressions place the 16-bit Real-Mode code and
60	 * Reset Vector at the end of the Flash ROM
61	 */
62	. = START_16 - RESET_SEG_START;
63	.start16 : AT (START_16) {
64		KEEP(*(.start16));
65	}
66
67	. = RESET_VEC_LOC - RESET_SEG_START;
68	.resetvec : AT (RESET_VEC_LOC) {
69		KEEP(*(.resetvec));
70	}
71#endif
72
73}
74