Blackfin: MPU: add missing __init markings
[safe/jmp/linux-2.6] / arch / blackfin / kernel / vmlinux.lds.S
1 /*
2  * Copyright 2004-2009 Analog Devices Inc.
3  *
4  * Licensed under the GPL-2 or later
5  */
6
7 #define VMLINUX_SYMBOL(_sym_) _##_sym_
8
9 #include <asm-generic/vmlinux.lds.h>
10 #include <asm/mem_map.h>
11 #include <asm/page.h>
12 #include <asm/thread_info.h>
13
14 OUTPUT_FORMAT("elf32-bfin")
15 ENTRY(__start)
16 _jiffies = _jiffies_64;
17
18 SECTIONS
19 {
20         . = CONFIG_BOOT_LOAD;
21         /* Neither the text, ro_data or bss section need to be aligned
22          * So pack them back to back
23          */
24         .text :
25         {
26                 __text = .;
27                 _text = .;
28                 __stext = .;
29                 TEXT_TEXT
30 #ifndef CONFIG_SCHEDULE_L1
31                 SCHED_TEXT
32 #endif
33                 LOCK_TEXT
34                 IRQENTRY_TEXT
35                 KPROBES_TEXT
36                 *(.text.*)
37                 *(.fixup)
38
39 #if !L1_CODE_LENGTH
40                 *(.l1.text)
41 #endif
42
43                 . = ALIGN(16);
44                 ___start___ex_table = .;
45                 *(__ex_table)
46                 ___stop___ex_table = .;
47
48                 __etext = .;
49         }
50
51         NOTES
52
53         /* Just in case the first read only is a 32-bit access */
54         RO_DATA(4)
55
56         .bss :
57         {
58                 . = ALIGN(4);
59                 ___bss_start = .;
60                 *(.bss .bss.*)
61                 *(COMMON)
62 #if !L1_DATA_A_LENGTH
63                 *(.l1.bss)
64 #endif
65 #if !L1_DATA_B_LENGTH
66                 *(.l1.bss.B)
67 #endif
68                 . = ALIGN(4);
69                 ___bss_stop = .;
70         }
71
72         .data :
73         {
74                 __sdata = .;
75                 /* This gets done first, so the glob doesn't suck it in */
76                 CACHELINE_ALIGNED_DATA(32)
77
78 #if !L1_DATA_A_LENGTH
79                 . = ALIGN(32);
80                 *(.data_l1.cacheline_aligned)
81                 *(.l1.data)
82 #endif
83 #if !L1_DATA_B_LENGTH
84                 *(.l1.data.B)
85 #endif
86 #if !L2_LENGTH
87                 . = ALIGN(32);
88                 *(.data_l2.cacheline_aligned)
89                 *(.l2.data)
90 #endif
91
92                 DATA_DATA
93                 CONSTRUCTORS
94
95                 INIT_TASK_DATA(THREAD_SIZE)
96
97                 __edata = .;
98         }
99
100         /* The init section should be last, so when we free it, it goes into
101          * the general memory pool, and (hopefully) will decrease fragmentation
102          * a tiny bit. The init section has a _requirement_ that it be
103          * PAGE_SIZE aligned
104          */
105         . = ALIGN(PAGE_SIZE);
106         ___init_begin = .;
107
108         INIT_TEXT_SECTION(PAGE_SIZE)
109         . = ALIGN(16);
110         INIT_DATA_SECTION(16)
111         PERCPU(4)
112
113         /* we have to discard exit text and such at runtime, not link time, to
114          * handle embedded cross-section references (alt instructions, bug
115          * table, eh_frame, etc...)
116          */
117         .exit.text :
118         {
119                 EXIT_TEXT
120         }
121         .exit.data :
122         {
123                 EXIT_DATA
124         }
125
126         .text_l1 L1_CODE_START : AT(LOADADDR(.exit.data) + SIZEOF(.exit.data))
127         {
128                 . = ALIGN(4);
129                 __stext_l1 = .;
130                 *(.l1.text)
131 #ifdef CONFIG_SCHEDULE_L1
132                 SCHED_TEXT
133 #endif
134                 . = ALIGN(4);
135                 __etext_l1 = .;
136         }
137         __text_l1_lma = LOADADDR(.text_l1);
138         __text_l1_len = SIZEOF(.text_l1);
139         ASSERT (__text_l1_len <= L1_CODE_LENGTH, "L1 text overflow!")
140
141         .data_l1 L1_DATA_A_START : AT(__text_l1_lma + __text_l1_len)
142         {
143                 . = ALIGN(4);
144                 __sdata_l1 = .;
145                 *(.l1.data)
146                 __edata_l1 = .;
147
148                 . = ALIGN(32);
149                 *(.data_l1.cacheline_aligned)
150
151                 . = ALIGN(4);
152                 __sbss_l1 = .;
153                 *(.l1.bss)
154                 . = ALIGN(4);
155                 __ebss_l1 = .;
156         }
157         __data_l1_lma = LOADADDR(.data_l1);
158         __data_l1_len = SIZEOF(.data_l1);
159         ASSERT (__data_l1_len <= L1_DATA_A_LENGTH, "L1 data A overflow!")
160
161         .data_b_l1 L1_DATA_B_START : AT(__data_l1_lma + __data_l1_len)
162         {
163                 . = ALIGN(4);
164                 __sdata_b_l1 = .;
165                 *(.l1.data.B)
166                 __edata_b_l1 = .;
167
168                 . = ALIGN(4);
169                 __sbss_b_l1 = .;
170                 *(.l1.bss.B)
171                 . = ALIGN(4);
172                 __ebss_b_l1 = .;
173         }
174         __data_b_l1_lma = LOADADDR(.data_b_l1);
175         __data_b_l1_len = SIZEOF(.data_b_l1);
176         ASSERT (__data_b_l1_len <= L1_DATA_B_LENGTH, "L1 data B overflow!")
177
178         .text_data_l2 L2_START : AT(__data_b_l1_lma + __data_b_l1_len)
179         {
180                 . = ALIGN(4);
181                 __stext_l2 = .;
182                 *(.l2.text)
183                 . = ALIGN(4);
184                 __etext_l2 = .;
185
186                 . = ALIGN(4);
187                 __sdata_l2 = .;
188                 *(.l2.data)
189                 __edata_l2 = .;
190
191                 . = ALIGN(32);
192                 *(.data_l2.cacheline_aligned)
193
194                 . = ALIGN(4);
195                 __sbss_l2 = .;
196                 *(.l2.bss)
197                 . = ALIGN(4);
198                 __ebss_l2 = .;
199         }
200         __l2_lma = LOADADDR(.text_data_l2);
201         __l2_len = SIZEOF(.text_data_l2);
202         ASSERT (__l2_len <= L2_LENGTH, "L2 overflow!")
203
204         /* Force trailing alignment of our init section so that when we
205          * free our init memory, we don't leave behind a partial page.
206          */
207         . = __l2_lma + __l2_len;
208         . = ALIGN(PAGE_SIZE);
209         ___init_end = .;
210
211         __end =.;
212
213         STABS_DEBUG
214
215         DWARF_DEBUG
216
217         DISCARDS
218 }