Commit | Line | Data |
---|---|---|
1394f032 BW |
1 | /* |
2 | * File: arch/blackfin/kernel/vmlinux.lds.S | |
3 | * Based on: none - original work | |
4 | * Author: | |
5 | * | |
6 | * Created: Tue Sep 21 2004 | |
7 | * Description: Master linker script for blackfin architecture | |
8 | * | |
9 | * Modified: | |
de6a9520 | 10 | * Copyright 2004-2007 Analog Devices Inc. |
1394f032 BW |
11 | * |
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | |
13 | * | |
14 | * This program is free software; you can redistribute it and/or modify | |
15 | * it under the terms of the GNU General Public License as published by | |
16 | * the Free Software Foundation; either version 2 of the License, or | |
17 | * (at your option) any later version. | |
18 | * | |
19 | * This program is distributed in the hope that it will be useful, | |
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 | * GNU General Public License for more details. | |
23 | * | |
24 | * You should have received a copy of the GNU General Public License | |
25 | * along with this program; if not, see the file COPYING, or write | |
26 | * to the Free Software Foundation, Inc., | |
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
28 | */ | |
29 | ||
30 | #define VMLINUX_SYMBOL(_sym_) _##_sym_ | |
31 | ||
32 | #include <asm-generic/vmlinux.lds.h> | |
33 | #include <asm/mem_map.h> | |
520473b0 | 34 | #include <asm/page.h> |
0fa63ad7 | 35 | #include <asm/thread_info.h> |
1394f032 | 36 | |
1394f032 BW |
37 | OUTPUT_FORMAT("elf32-bfin") |
38 | ENTRY(__start) | |
39 | _jiffies = _jiffies_64; | |
40 | ||
1394f032 BW |
41 | SECTIONS |
42 | { | |
43 | . = CONFIG_BOOT_LOAD; | |
1394f032 BW |
44 | .text : |
45 | { | |
de6a9520 MF |
46 | __text = .; |
47 | _text = .; | |
48 | __stext = .; | |
7664709b | 49 | TEXT_TEXT |
1394f032 | 50 | SCHED_TEXT |
de6a9520 | 51 | LOCK_TEXT |
27d875f2 MF |
52 | KPROBES_TEXT |
53 | *(.text.*) | |
de6a9520 MF |
54 | *(.fixup) |
55 | ||
1394f032 | 56 | . = ALIGN(16); |
de6a9520 | 57 | ___start___ex_table = .; |
1394f032 | 58 | *(__ex_table) |
de6a9520 | 59 | ___stop___ex_table = .; |
1394f032 | 60 | |
1394f032 | 61 | . = ALIGN(4); |
1394f032 | 62 | __etext = .; |
de6a9520 MF |
63 | } |
64 | ||
27d875f2 | 65 | RO_DATA(PAGE_SIZE) |
de6a9520 MF |
66 | |
67 | .data : | |
68 | { | |
0fa63ad7 BS |
69 | /* make sure the init_task is aligned to the |
70 | * kernel thread size so we can locate the kernel | |
71 | * stack properly and quickly. | |
72 | */ | |
de6a9520 | 73 | __sdata = .; |
0fa63ad7 | 74 | . = ALIGN(THREAD_SIZE); |
de6a9520 | 75 | *(.data.init_task) |
de6a9520 MF |
76 | |
77 | . = ALIGN(32); | |
78 | *(.data.cacheline_aligned) | |
79 | ||
27d875f2 MF |
80 | DATA_DATA |
81 | *(.data.*) | |
82 | CONSTRUCTORS | |
83 | ||
0fa63ad7 | 84 | . = ALIGN(THREAD_SIZE); |
de6a9520 MF |
85 | __edata = .; |
86 | } | |
1394f032 | 87 | |
de6a9520 | 88 | ___init_begin = .; |
27d875f2 MF |
89 | |
90 | .init.text : | |
1394f032 | 91 | { |
0fa63ad7 | 92 | . = ALIGN(PAGE_SIZE); |
1394f032 BW |
93 | __sinittext = .; |
94 | *(.init.text) | |
95 | __einittext = .; | |
27d875f2 MF |
96 | } |
97 | .init.data : | |
98 | { | |
99 | . = ALIGN(16); | |
1394f032 | 100 | *(.init.data) |
27d875f2 MF |
101 | } |
102 | .init.setup : | |
103 | { | |
1394f032 BW |
104 | . = ALIGN(16); |
105 | ___setup_start = .; | |
106 | *(.init.setup) | |
107 | ___setup_end = .; | |
27d875f2 MF |
108 | } |
109 | .initcall.init : | |
110 | { | |
1394f032 BW |
111 | ___initcall_start = .; |
112 | INITCALLS | |
113 | ___initcall_end = .; | |
27d875f2 MF |
114 | } |
115 | .con_initcall.init : | |
116 | { | |
1394f032 BW |
117 | ___con_initcall_start = .; |
118 | *(.con_initcall.init) | |
119 | ___con_initcall_end = .; | |
27d875f2 MF |
120 | } |
121 | SECURITY_INIT | |
122 | .init.ramfs : | |
123 | { | |
1394f032 BW |
124 | . = ALIGN(4); |
125 | ___initramfs_start = .; | |
126 | *(.init.ramfs) | |
127 | ___initramfs_end = .; | |
de6a9520 | 128 | } |
1394f032 | 129 | |
de6a9520 | 130 | __l1_lma_start = .; |
1394f032 | 131 | |
27d875f2 | 132 | .text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs)) |
1394f032 BW |
133 | { |
134 | . = ALIGN(4); | |
de6a9520 | 135 | __stext_l1 = .; |
1394f032 BW |
136 | *(.l1.text) |
137 | ||
138 | . = ALIGN(4); | |
de6a9520 MF |
139 | __etext_l1 = .; |
140 | } | |
1394f032 | 141 | |
de6a9520 | 142 | .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1)) |
1394f032 BW |
143 | { |
144 | . = ALIGN(4); | |
de6a9520 | 145 | __sdata_l1 = .; |
1394f032 | 146 | *(.l1.data) |
de6a9520 | 147 | __edata_l1 = .; |
1394f032 BW |
148 | |
149 | . = ALIGN(4); | |
de6a9520 | 150 | __sbss_l1 = .; |
1394f032 BW |
151 | *(.l1.bss) |
152 | ||
153 | . = ALIGN(32); | |
154 | *(.data_l1.cacheline_aligned) | |
155 | ||
156 | . = ALIGN(4); | |
de6a9520 MF |
157 | __ebss_l1 = .; |
158 | } | |
159 | ||
160 | .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1)) | |
1394f032 BW |
161 | { |
162 | . = ALIGN(4); | |
163 | __sdata_b_l1 = .; | |
164 | *(.l1.data.B) | |
165 | __edata_b_l1 = .; | |
166 | ||
167 | . = ALIGN(4); | |
168 | __sbss_b_l1 = .; | |
169 | *(.l1.bss.B) | |
170 | ||
171 | . = ALIGN(4); | |
172 | __ebss_b_l1 = .; | |
de6a9520 | 173 | } |
1394f032 | 174 | |
0fa63ad7 | 175 | ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1); |
1394f032 | 176 | |
0fa63ad7 | 177 | .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) : |
1394f032 BW |
178 | { |
179 | . = ALIGN(4); | |
de6a9520 | 180 | ___bss_start = .; |
fbeb7370 | 181 | *(.bss .bss.*) |
1394f032 BW |
182 | *(COMMON) |
183 | . = ALIGN(4); | |
de6a9520 MF |
184 | ___bss_stop = .; |
185 | __end = .; | |
186 | } | |
187 | ||
188 | /DISCARD/ : | |
189 | { | |
190 | *(.exit.text) | |
191 | *(.exit.data) | |
192 | *(.exitcall.exit) | |
193 | } | |
1394f032 | 194 | } |