xref: /rk3399_rockchip-uboot/arch/mips/cpu/u-boot.lds (revision 186d8159f662e8b4964dca3ff5c87f06cf290a82)
1/*
2 * (C) Copyright 2003
3 * Wolfgang Denk Engineering, <wd@denx.de>
4 *
5 * SPDX-License-Identifier:	GPL-2.0+
6 */
7
8#if defined(CONFIG_64BIT)
9#define PTR_COUNT_SHIFT	3
10#else
11#define PTR_COUNT_SHIFT	2
12#endif
13
14OUTPUT_ARCH(mips)
15ENTRY(_start)
16SECTIONS
17{
18	. = 0x00000000;
19
20	. = ALIGN(4);
21	.text : {
22		*(.text*)
23	}
24
25	. = ALIGN(4);
26	.rodata : {
27		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
28	}
29
30	. = ALIGN(4);
31	.data : {
32		*(.data*)
33	}
34
35	. = .;
36	_gp = ALIGN(16) + 0x7ff0;
37
38	.got : {
39		*(.got)
40	}
41
42	num_got_entries = SIZEOF(.got) >> PTR_COUNT_SHIFT;
43
44	. = ALIGN(4);
45	.sdata : {
46		*(.sdata*)
47	}
48
49	. = ALIGN(4);
50	.u_boot_list : {
51		KEEP(*(SORT(.u_boot_list*)));
52	}
53
54	. = ALIGN(4);
55	__image_copy_end = .;
56
57	.rel.dyn : {
58		__rel_dyn_start = .;
59		*(.rel.dyn)
60		__rel_dyn_end = .;
61	}
62
63	_end = .;
64
65	.bss __rel_dyn_start (OVERLAY) : {
66		__bss_start = .;
67		*(.sbss.*)
68		*(.bss.*)
69		*(COMMON)
70		. = ALIGN(4);
71		__bss_end = .;
72	}
73
74	.dynsym _end : {
75		*(.dynsym)
76	}
77
78	.dynbss : {
79		*(.dynbss)
80	}
81
82	.dynstr : {
83		*(.dynstr)
84	}
85
86	.dynamic : {
87		*(.dynamic)
88	}
89
90	.plt : {
91		*(.plt)
92	}
93
94	.interp : {
95		*(.interp)
96	}
97
98	.gnu : {
99		*(.gnu*)
100	}
101
102	.MIPS.stubs : {
103		*(.MIPS.stubs)
104	}
105
106	.hash : {
107		*(.hash)
108	}
109}
110