]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/mips/cpu/u-boot.lds
MIPS: refactor setting of compiler options
[people/ms/u-boot.git] / arch / mips / cpu / u-boot.lds
CommitLineData
cb5dbca8
GJ
1/*
2 * (C) Copyright 2003
3 * Wolfgang Denk Engineering, <wd@denx.de>
4 *
1a459660 5 * SPDX-License-Identifier: GPL-2.0+
cb5dbca8
GJ
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 : {
cb5dbca8 39 *(.got)
cb5dbca8
GJ
40 }
41
45397816
GJ
42 num_got_entries = SIZEOF(.got) >> PTR_COUNT_SHIFT;
43
cb5dbca8
GJ
44 . = ALIGN(4);
45 .sdata : {
46 *(.sdata*)
47 }
48
49 . = ALIGN(4);
50 .u_boot_list : {
ef123c52 51 KEEP(*(SORT(.u_boot_list*)));
cb5dbca8
GJ
52 }
53
cb5dbca8 54 . = ALIGN(4);
3420bf1c 55 __image_copy_end = .;
a0af08b9 56 __init_end = .;
3420bf1c 57
0ba8926e
GJ
58 .rel.dyn : {
59 __rel_dyn_start = .;
60 *(.rel.dyn)
61 __rel_dyn_end = .;
62 }
63
79fd7e64 64 _end = .;
0ba8926e
GJ
65
66 .bss __rel_dyn_start (OVERLAY) : {
a52852c5
DS
67 __bss_start = .;
68 *(.sbss.*)
69 *(.bss.*)
70 *(COMMON)
cb5dbca8 71 . = ALIGN(4);
a52852c5 72 __bss_end = .;
cb5dbca8 73 }
0ba8926e 74
79fd7e64
DS
75 .dynsym _end : {
76 *(.dynsym)
77 }
78
79 .dynbss : {
0ba8926e 80 *(.dynbss)
79fd7e64
DS
81 }
82
83 .dynstr : {
0ba8926e 84 *(.dynstr)
79fd7e64
DS
85 }
86
87 .dynamic : {
0ba8926e 88 *(.dynamic)
79fd7e64
DS
89 }
90
91 .plt : {
92 *(.plt)
93 }
94
95 .interp : {
0ba8926e 96 *(.interp)
79fd7e64
DS
97 }
98
99 .gnu : {
100 *(.gnu*)
101 }
102
103 .MIPS.stubs : {
104 *(.MIPS.stubs)
105 }
106
107 .hash : {
0ba8926e 108 *(.hash)
0ba8926e 109 }
cb5dbca8 110}