Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[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
35 OUTPUT_FORMAT("elf32-bfin")
36 ENTRY(__start)
37 _jiffies = _jiffies_64;
38
39 SECTIONS
40 {
41         . = CONFIG_BOOT_LOAD;
42         .text :
43         {
44                 __text = .;
45                 _text = .;
46                 __stext = .;
47                 TEXT_TEXT
48                 SCHED_TEXT
49                 LOCK_TEXT
50                 *(.text.lock)
51                 *(.fixup)
52
53                 . = ALIGN(16);
54                 ___start___ex_table = .;
55                 *(__ex_table)
56                 ___stop___ex_table = .;
57
58                 . = ALIGN(4);
59                 __etext = .;
60         }
61
62         RODATA
63
64         .data :
65         {
66                 __sdata = .;
67                 . = ALIGN(0x2000);
68                 *(.data.init_task)
69                 DATA_DATA
70                 CONSTRUCTORS
71
72                 . = ALIGN(32);
73                 *(.data.cacheline_aligned)
74
75                 . = ALIGN(0x2000);
76                 __edata = .;
77         }
78
79         ___init_begin = .;
80         .init :
81         {
82                 . = ALIGN(4096);
83                 __sinittext = .;
84                 *(.init.text)
85                 __einittext = .;
86                 *(.init.data)
87                 . = ALIGN(16);
88                 ___setup_start = .;
89                 *(.init.setup)
90                 ___setup_end = .;
91                 ___start___param = .;
92                 *(__param)
93                 ___stop___param = .;
94                 ___initcall_start = .;
95                 INITCALLS
96                 ___initcall_end = .;
97                 ___con_initcall_start = .;
98                 *(.con_initcall.init)
99                 ___con_initcall_end = .;
100                 ___security_initcall_start = .;
101                 *(.security_initcall.init)
102                 ___security_initcall_end = .;
103                 . = ALIGN(4);
104                 ___initramfs_start = .;
105                 *(.init.ramfs)
106                 ___initramfs_end = .;
107                 . = ALIGN(4);
108         }
109
110         __l1_lma_start = .;
111
112         .text_l1 L1_CODE_START : AT(LOADADDR(.init) + SIZEOF(.init))
113         {
114                 . = ALIGN(4);
115                 __stext_l1 = .;
116                 *(.l1.text)
117
118                 . = ALIGN(4);
119                 __etext_l1 = .;
120         }
121
122         .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
123         {
124                 . = ALIGN(4);
125                 __sdata_l1 = .;
126                 *(.l1.data)
127                 __edata_l1 = .;
128
129                 . = ALIGN(4);
130                 __sbss_l1 = .;
131                 *(.l1.bss)
132
133                 . = ALIGN(32);
134                 *(.data_l1.cacheline_aligned)
135
136                 . = ALIGN(4);
137                 __ebss_l1 = .;
138         }
139
140         .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
141         {
142                 . = ALIGN(4);
143                 __sdata_b_l1 = .;
144                 *(.l1.data.B)
145                 __edata_b_l1 = .;
146
147                 . = ALIGN(4);
148                 __sbss_b_l1 = .;
149                 *(.l1.bss.B)
150
151                 . = ALIGN(4);
152                 __ebss_b_l1 = .;
153         }
154
155         ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
156
157         .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) :
158         {
159                 . = ALIGN(4);
160                 ___bss_start = .;
161                 *(.bss)
162                 *(COMMON)
163                 . = ALIGN(4);
164                 ___bss_stop = .;
165                 __end = .;
166         }
167
168         /DISCARD/ :
169         {
170                 *(.exit.text)
171                 *(.exit.data)
172                 *(.exitcall.exit)
173         }
174 }