blob: e504ea754403a23df0bd81b0079a2f9e40739a56 [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 : {
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 : {
Gabor Juhos7f444662013-01-30 04:31:52 +000039 *(.got)
Gabor Juhos7f444662013-01-30 04:31:52 +000040 }
41
Gabor Juhos7092ce82013-02-12 22:22:12 +010042 num_got_entries = SIZEOF(.got) >> PTR_COUNT_SHIFT;
43
Gabor Juhos7f444662013-01-30 04:31:52 +000044 . = ALIGN(4);
45 .sdata : {
46 *(.sdata*)
47 }
48
49 . = ALIGN(4);
50 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000051 KEEP(*(SORT(.u_boot_list*)));
Gabor Juhos7f444662013-01-30 04:31:52 +000052 }
53
Gabor Juhos7f444662013-01-30 04:31:52 +000054 . = ALIGN(4);
Daniel Schwierzeck9049d032013-02-12 22:22:12 +010055 __image_copy_end = .;
Paul Burtond0589bb2014-04-07 10:11:19 +010056 __init_end = .;
Daniel Schwierzeck9049d032013-02-12 22:22:12 +010057
Gabor Juhos44ea3c32013-02-12 22:22:13 +010058 .rel.dyn : {
59 __rel_dyn_start = .;
60 *(.rel.dyn)
61 __rel_dyn_end = .;
62 }
63
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020064 _end = .;
Gabor Juhos44ea3c32013-02-12 22:22:13 +010065
66 .bss __rel_dyn_start (OVERLAY) : {
Daniel Schwierzeck56b5ec72013-02-12 22:22:12 +010067 __bss_start = .;
68 *(.sbss.*)
69 *(.bss.*)
70 *(COMMON)
Gabor Juhos7f444662013-01-30 04:31:52 +000071 . = ALIGN(4);
Daniel Schwierzeck56b5ec72013-02-12 22:22:12 +010072 __bss_end = .;
Gabor Juhos7f444662013-01-30 04:31:52 +000073 }
Gabor Juhos44ea3c32013-02-12 22:22:13 +010074
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020075 .dynsym _end : {
76 *(.dynsym)
77 }
78
79 .dynbss : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +010080 *(.dynbss)
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020081 }
82
83 .dynstr : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +010084 *(.dynstr)
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020085 }
86
87 .dynamic : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +010088 *(.dynamic)
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020089 }
90
91 .plt : {
92 *(.plt)
93 }
94
95 .interp : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +010096 *(.interp)
Daniel Schwierzeck1263ea82013-10-11 17:46:59 +020097 }
98
99 .gnu : {
100 *(.gnu*)
101 }
102
103 .MIPS.stubs : {
104 *(.MIPS.stubs)
105 }
106
107 .hash : {
Gabor Juhos44ea3c32013-02-12 22:22:13 +0100108 *(.hash)
Gabor Juhos44ea3c32013-02-12 22:22:13 +0100109 }
Gabor Juhos7f444662013-01-30 04:31:52 +0000110}