]> err.no Git - linux-2.6/blob - arch/blackfin/kernel/vmlinux.lds.S
Blackfin arch: parse input sections properly when using -ffunction-sections/-fdata...
[linux-2.6] / 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         .text :
45         {
46                 __text = .;
47                 _text = .;
48                 __stext = .;
49                 *(.text.*)
50                 TEXT_TEXT
51                 SCHED_TEXT
52                 LOCK_TEXT
53                 *(.text.lock)
54                 *(.fixup)
55
56                 . = ALIGN(16);
57                 ___start___ex_table = .;
58                 *(__ex_table)
59                 ___stop___ex_table = .;
60
61                 . = ALIGN(4);
62                 __etext = .;
63         }
64
65         RODATA
66
67         .data :
68         {
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                  */
73                 __sdata = .;
74                 . = ALIGN(THREAD_SIZE);
75                 *(.data.init_task)
76                 DATA_DATA
77                 *(.data.*)
78                 CONSTRUCTORS
79
80                 . = ALIGN(32);
81                 *(.data.cacheline_aligned)
82
83                 . = ALIGN(THREAD_SIZE);
84                 __edata = .;
85         }
86
87         ___init_begin = .;
88         .init :
89         {
90                 . = ALIGN(PAGE_SIZE);
91                 __sinittext = .;
92                 *(.init.text)
93                 __einittext = .;
94                 *(.init.data)
95                 . = ALIGN(16);
96                 ___setup_start = .;
97                 *(.init.setup)
98                 ___setup_end = .;
99                 ___start___param = .;
100                 *(__param)
101                 ___stop___param = .;
102                 ___initcall_start = .;
103                 INITCALLS
104                 ___initcall_end = .;
105                 ___con_initcall_start = .;
106                 *(.con_initcall.init)
107                 ___con_initcall_end = .;
108                 ___security_initcall_start = .;
109                 *(.security_initcall.init)
110                 ___security_initcall_end = .;
111                 . = ALIGN(4);
112                 ___initramfs_start = .;
113                 *(.init.ramfs)
114                 ___initramfs_end = .;
115                 . = ALIGN(4);
116         }
117
118         __l1_lma_start = .;
119
120         .text_l1 L1_CODE_START : AT(LOADADDR(.init) + SIZEOF(.init))
121         {
122                 . = ALIGN(4);
123                 __stext_l1 = .;
124                 *(.l1.text)
125
126                 . = ALIGN(4);
127                 __etext_l1 = .;
128         }
129
130         .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
131         {
132                 . = ALIGN(4);
133                 __sdata_l1 = .;
134                 *(.l1.data)
135                 __edata_l1 = .;
136
137                 . = ALIGN(4);
138                 __sbss_l1 = .;
139                 *(.l1.bss)
140
141                 . = ALIGN(32);
142                 *(.data_l1.cacheline_aligned)
143
144                 . = ALIGN(4);
145                 __ebss_l1 = .;
146         }
147
148         .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
149         {
150                 . = ALIGN(4);
151                 __sdata_b_l1 = .;
152                 *(.l1.data.B)
153                 __edata_b_l1 = .;
154
155                 . = ALIGN(4);
156                 __sbss_b_l1 = .;
157                 *(.l1.bss.B)
158
159                 . = ALIGN(4);
160                 __ebss_b_l1 = .;
161         }
162
163         ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
164
165         .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) :
166         {
167                 . = ALIGN(4);
168                 ___bss_start = .;
169                 *(.bss .bss.*)
170                 *(COMMON)
171                 . = ALIGN(4);
172                 ___bss_stop = .;
173                 __end = .;
174         }
175
176         /DISCARD/ :
177         {
178                 *(.exit.text)
179                 *(.exit.data)
180                 *(.exitcall.exit)
181         }
182 }