xref: /openbmc/u-boot/arch/x86/cpu/u-boot.lds (revision 0c331ebc)
1/*
2 * (C) Copyright 2002
3 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
4 *
5 * SPDX-License-Identifier:	GPL-2.0+
6 */
7
8#include <config.h>
9OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
10OUTPUT_ARCH(i386)
11ENTRY(_start)
12
13SECTIONS
14{
15	. = CONFIG_SYS_TEXT_BASE;	/* Location of bootcode in flash */
16	__text_start = .;
17	.text  : { *(.text*); }
18
19	. = ALIGN(4);
20
21	. = ALIGN(4);
22	.u_boot_list : {
23		KEEP(*(SORT(.u_boot_list*)));
24	}
25
26	. = ALIGN(4);
27	.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
28
29	. = ALIGN(4);
30	.data : { *(.data*) }
31
32	. = ALIGN(4);
33	.hash : { *(.hash*) }
34
35	. = ALIGN(4);
36	.got : { *(.got*) }
37
38	. = ALIGN(4);
39	__data_end = .;
40	__init_end = .;
41
42	. = ALIGN(4);
43	.dynsym : { *(.dynsym*) }
44
45	. = ALIGN(4);
46	__rel_dyn_start = .;
47	.rel.dyn : {
48		*(.rel*)
49	}
50	__rel_dyn_end = .;
51	. = ALIGN(4);
52	_end = .;
53
54	.bss __rel_dyn_start (OVERLAY) : {
55		__bss_start = .;
56		*(.bss)
57		*(COM*)
58		. = ALIGN(4);
59		__bss_end = .;
60	}
61
62	/DISCARD/ : { *(.dynstr*) }
63	/DISCARD/ : { *(.dynamic*) }
64	/DISCARD/ : { *(.plt*) }
65	/DISCARD/ : { *(.interp*) }
66	/DISCARD/ : { *(.gnu*) }
67
68#ifdef CONFIG_X86_RESET_VECTOR
69	/*
70	 * The following expressions place the 16-bit Real-Mode code and
71	 * Reset Vector at the end of the Flash ROM
72	 */
73	. = START_16 - RESET_SEG_START;
74	.start16 : AT (START_16) {
75		KEEP(*(.start16));
76	}
77
78	. = RESET_VEC_LOC - RESET_SEG_START;
79	.resetvec : AT (RESET_VEC_LOC) {
80		KEEP(*(.resetvec));
81	}
82#endif
83
84}
85