blob: 4c9edf8a6928178a16386c8307167b2df9ad3a86 [file] [log] [blame]
Gabor Juhoscb5dbca2013-01-30 04:31:52 +00001/*
2 * (C) Copyright 2003
3 * Wolfgang Denk Engineering, <wd@denx.de>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Gabor Juhoscb5dbca2013-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 Juhoscb5dbca2013-01-30 04:31:52 +000039 *(.got)
Gabor Juhoscb5dbca2013-01-30 04:31:52 +000040 }
41
Gabor Juhos45397812013-02-12 22:22:12 +010042 num_got_entries = SIZEOF(.got) >> PTR_COUNT_SHIFT;
43
Gabor Juhoscb5dbca2013-01-30 04:31:52 +000044 . = ALIGN(4);
45 .sdata : {
46 *(.sdata*)
47 }
48
49 . = ALIGN(4);
50 .u_boot_list : {
Albert ARIBAUDef123c52013-02-25 00:59:00 +000051 KEEP(*(SORT(.u_boot_list*)));
Gabor Juhoscb5dbca2013-01-30 04:31:52 +000052 }
53
Gabor Juhoscb5dbca2013-01-30 04:31:52 +000054 . = ALIGN(4);
Daniel Schwierzeck3420bf12013-02-12 22:22:12 +010055 __image_copy_end = .;
56
Gabor Juhos0ba89262013-02-12 22:22:13 +010057 .rel.dyn : {
58 __rel_dyn_start = .;
59 *(.rel.dyn)
60 __rel_dyn_end = .;
61 }
62
Daniel Schwierzeck79fd7e62013-10-11 17:46:59 +020063 _end = .;
Gabor Juhos0ba89262013-02-12 22:22:13 +010064
65 .bss __rel_dyn_start (OVERLAY) : {
Daniel Schwierzecka52852c2013-02-12 22:22:12 +010066 __bss_start = .;
67 *(.sbss.*)
68 *(.bss.*)
69 *(COMMON)
70 . = ALIGN(4);
71 __bss_end = .;
Gabor Juhoscb5dbca2013-01-30 04:31:52 +000072 }
Gabor Juhos0ba89262013-02-12 22:22:13 +010073
Daniel Schwierzeck79fd7e62013-10-11 17:46:59 +020074 .dynsym _end : {
75 *(.dynsym)
76 }
77
78 .dynbss : {
Gabor Juhos0ba89262013-02-12 22:22:13 +010079 *(.dynbss)
Daniel Schwierzeck79fd7e62013-10-11 17:46:59 +020080 }
81
82 .dynstr : {
Gabor Juhos0ba89262013-02-12 22:22:13 +010083 *(.dynstr)
Daniel Schwierzeck79fd7e62013-10-11 17:46:59 +020084 }
85
86 .dynamic : {
Gabor Juhos0ba89262013-02-12 22:22:13 +010087 *(.dynamic)
Daniel Schwierzeck79fd7e62013-10-11 17:46:59 +020088 }
89
90 .plt : {
Gabor Juhos0ba89262013-02-12 22:22:13 +010091 *(.plt)
Daniel Schwierzeck79fd7e62013-10-11 17:46:59 +020092 }
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)
Gabor Juhos0ba89262013-02-12 22:22:13 +0100108 }
Gabor Juhoscb5dbca2013-01-30 04:31:52 +0000109}