xref: /rk3399_rockchip-uboot/arch/x86/cpu/u-boot.lds (revision 091c4943539f8a0b238246e043683e3cbf657b5e)
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	/*
71	 * The following expressions place the 16-bit Real-Mode code and
72	 * Reset Vector at the end of the Flash ROM
73	 */
74	. = START_16;
75	.start16 : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + START_16)) { KEEP(*(.start16)); }
76
77	. = RESET_VEC_LOC;
78	.resetvec : AT (CONFIG_SYS_TEXT_BASE + (CONFIG_SYS_MONITOR_LEN - RESET_SEG_SIZE + RESET_VEC_LOC)) { KEEP(*(.resetvec)); }
79#endif
80}
81