blob: bd5536f0137466a7c849c85829a872adde6dcc6c [file] [log] [blame]
Gabor Juhos7f444662013-01-30 04:31:52 +00001/*
2 * (C) Copyright 2003
3 * Wolfgang Denk Engineering, <wd@denx.de>
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Gabor Juhos7f444662013-01-30 04:31:52 +00006 */
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 : {
Paul Burton92a06ee2016-09-21 11:11:06 +010022 __text_start = .;
Gabor Juhos7f444662013-01-30 04:31:52 +000023 *(.text*)
Paul Burton92a06ee2016-09-21 11:11:06 +010024 __text_end = .;
Gabor Juhos7f444662013-01-30 04:31:52 +000025 }
26
27 . = ALIGN(4);
28 .rodata : {
29 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
30 }
31
32 . = ALIGN(4);
33 .data : {
34 *(.data*)
35 }
36
Gabor Juhos7f444662013-01-30 04:31:52 +000037 . = ALIGN(4);
38 .sdata : {
39 *(.sdata*)
40 }
41
42 . = ALIGN(4);
43 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000044 KEEP(*(SORT(.u_boot_list*)));
Gabor Juhos7f444662013-01-30 04:31:52 +000045 }
46
Gabor Juhos7f444662013-01-30 04:31:52 +000047 . = ALIGN(4);
Daniel Schwierzeck9049d032013-02-12 22:22:12 +010048 __image_copy_end = .;
Paul Burtond0589bb2014-04-07 10:11:19 +010049 __init_end = .;
Daniel Schwierzeck9049d032013-02-12 22:22:12 +010050
Paul Burtond3a278d2017-06-19 11:53:47 -070051 /*
52 * .rel must come last so that the mips-relocs tool can shrink
53 * the section size & the PT_LOAD program header filesz.
54 */
55 .rel : {
56 __rel_start = .;
57 BYTE(0x0)
58 . += (32 * 1024) - 1;
Daniel Schwierzeck4e6cdff2014-10-29 17:30:36 +010059 }
60
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020061 _end = .;
Gabor Juhos44ea3c32013-02-12 22:22:13 +010062
Paul Burtond3a278d2017-06-19 11:53:47 -070063 .bss __rel_start (OVERLAY) : {
Daniel Schwierzeck56b5ec72013-02-12 22:22:12 +010064 __bss_start = .;
65 *(.sbss.*)
66 *(.bss.*)
67 *(COMMON)
Gabor Juhos7f444662013-01-30 04:31:52 +000068 . = ALIGN(4);
Daniel Schwierzeck56b5ec72013-02-12 22:22:12 +010069 __bss_end = .;
Gabor Juhos7f444662013-01-30 04:31:52 +000070 }
Gabor Juhos44ea3c32013-02-12 22:22:13 +010071
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020072 .dynsym _end : {
73 *(.dynsym)
74 }
75
76 .dynbss : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +010077 *(.dynbss)
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020078 }
79
80 .dynstr : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +010081 *(.dynstr)
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020082 }
83
84 .dynamic : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +010085 *(.dynamic)
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020086 }
87
88 .plt : {
89 *(.plt)
90 }
91
92 .interp : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +010093 *(.interp)
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020094 }
95
96 .gnu : {
97 *(.gnu*)
98 }
99
100 .MIPS.stubs : {
101 *(.MIPS.stubs)
102 }
103
104 .hash : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +0100105 *(.hash)
Gabor Juhos44ea3c32013-02-12 22:22:13 +0100106 }
Gabor Juhos7f444662013-01-30 04:31:52 +0000107}