dsp56k: Fix BKL pushdown
[pandora-kernel.git] / arch / blackfin / kernel / vmlinux.lds.S
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:
10  *               Copyright 2004-2007 Analog Devices Inc.
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>
34 #include <asm/page.h>
35 #include <asm/thread_info.h>
36
37 OUTPUT_FORMAT("elf32-bfin")
38 ENTRY(__start)
39 _jiffies = _jiffies_64;
40
41 SECTIONS
42 {
43         . = CONFIG_BOOT_LOAD;
44         /* Neither the text, ro_data or bss section need to be aligned
45          * So pack them back to back
46          */
47         .text :
48         {
49                 __text = .;
50                 _text = .;
51                 __stext = .;
52                 TEXT_TEXT
53                 SCHED_TEXT
54                 LOCK_TEXT
55                 KPROBES_TEXT
56                 *(.text.*)
57                 *(.fixup)
58
59 #if !L1_CODE_LENGTH
60                 *(.l1.text)
61 #endif
62
63                 . = ALIGN(16);
64                 ___start___ex_table = .;
65                 *(__ex_table)
66                 ___stop___ex_table = .;
67
68                 __etext = .;
69         }
70
71         /* Just in case the first read only is a 32-bit access */
72         RO_DATA(4)
73
74         .bss :
75         {
76                 . = ALIGN(4);
77                 ___bss_start = .;
78                 *(.bss .bss.*)
79                 *(COMMON)
80 #if !L1_DATA_A_LENGTH
81                 *(.l1.bss)
82 #endif
83 #if !L1_DATA_B_LENGTH
84                 *(.l1.bss.B)
85 #endif
86                 ___bss_stop = .;
87         }
88
89         .data :
90         {
91                 __sdata = .;
92                 /* This gets done first, so the glob doesn't suck it in */
93                 . = ALIGN(32);
94                 *(.data.cacheline_aligned)
95
96 #if !L1_DATA_A_LENGTH
97                 . = ALIGN(32);
98                 *(.data_l1.cacheline_aligned)
99                 *(.l1.data)
100 #endif
101 #if !L1_DATA_B_LENGTH
102                 *(.l1.data.B)
103 #endif
104
105                 DATA_DATA
106                 *(.data.*)
107                 CONSTRUCTORS
108
109                 /* make sure the init_task is aligned to the
110                  * kernel thread size so we can locate the kernel
111                  * stack properly and quickly.
112                  */
113                 . = ALIGN(THREAD_SIZE);
114                 *(.init_task.data)
115
116                 __edata = .;
117         }
118
119         /* The init section should be last, so when we free it, it goes into
120          * the general memory pool, and (hopefully) will decrease fragmentation
121          * a tiny bit. The init section has a _requirement_ that it be
122          * PAGE_SIZE aligned
123          */
124         . = ALIGN(PAGE_SIZE);
125         ___init_begin = .;
126
127         .init.text :
128         {
129                 . = ALIGN(PAGE_SIZE);
130                 __sinittext = .;
131                 INIT_TEXT
132                 __einittext = .;
133         }
134         .init.data :
135         {
136                 . = ALIGN(16);
137                 INIT_DATA
138         }
139         .init.setup :
140         {
141                 . = ALIGN(16);
142                 ___setup_start = .;
143                 *(.init.setup)
144                 ___setup_end = .;
145         }
146         .initcall.init :
147         {
148                 ___initcall_start = .;
149                 INITCALLS
150                 ___initcall_end = .;
151         }
152         .con_initcall.init :
153         {
154                 ___con_initcall_start = .;
155                 *(.con_initcall.init)
156                 ___con_initcall_end = .;
157         }
158         SECURITY_INIT
159         .init.ramfs :
160         {
161                 . = ALIGN(4);
162                 ___initramfs_start = .;
163                 *(.init.ramfs)
164                 ___initramfs_end = .;
165         }
166
167         __l1_lma_start = .;
168
169         .text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs))
170         {
171                 . = ALIGN(4);
172                 __stext_l1 = .;
173                 *(.l1.text)
174                 . = ALIGN(4);
175                 __etext_l1 = .;
176         }
177
178         .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
179         {
180                 . = ALIGN(4);
181                 __sdata_l1 = .;
182                 *(.l1.data)
183                 __edata_l1 = .;
184
185                 . = ALIGN(4);
186                 __sbss_l1 = .;
187                 *(.l1.bss)
188
189                 . = ALIGN(32);
190                 *(.data_l1.cacheline_aligned)
191
192                 . = ALIGN(4);
193                 __ebss_l1 = .;
194         }
195
196         .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
197         {
198                 . = ALIGN(4);
199                 __sdata_b_l1 = .;
200                 *(.l1.data.B)
201                 __edata_b_l1 = .;
202
203                 . = ALIGN(4);
204                 __sbss_b_l1 = .;
205                 *(.l1.bss.B)
206
207                 . = ALIGN(4);
208                 __ebss_b_l1 = .;
209         }
210
211         /* Force trailing alignment of our init section so that when we
212          * free our init memory, we don't leave behind a partial page.
213          */
214         . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
215         . = ALIGN(PAGE_SIZE);
216         ___init_end = .;
217
218         __end =.;
219
220         STABS_DEBUG
221
222         DWARF_DEBUG
223
224         /DISCARD/ :
225         {
226                 EXIT_TEXT
227                 EXIT_DATA
228                 *(.exitcall.exit)
229         }
230 }