blob: 1ef1e36b3957d95690efddea5416d52c58755975 [file] [log] [blame]
Bryan Wu1394f032007-05-06 14:50:22 -07001/*
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:
Mike Frysingerde6a9522007-06-11 17:27:05 +080010 * Copyright 2004-2007 Analog Devices Inc.
Bryan Wu1394f032007-05-06 14:50:22 -070011 *
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
Bryan Wu1394f032007-05-06 14:50:22 -070035OUTPUT_FORMAT("elf32-bfin")
36ENTRY(__start)
37_jiffies = _jiffies_64;
38
Bryan Wu1394f032007-05-06 14:50:22 -070039SECTIONS
40{
41 . = CONFIG_BOOT_LOAD;
Bryan Wu1394f032007-05-06 14:50:22 -070042 .text :
43 {
Mike Frysingerde6a9522007-06-11 17:27:05 +080044 __text = .;
45 _text = .;
46 __stext = .;
Sam Ravnborg76647092007-05-13 00:31:33 +020047 TEXT_TEXT
Bryan Wu1394f032007-05-06 14:50:22 -070048 SCHED_TEXT
Mike Frysingerde6a9522007-06-11 17:27:05 +080049 LOCK_TEXT
Bryan Wu1394f032007-05-06 14:50:22 -070050 *(.text.lock)
Bryan Wu1394f032007-05-06 14:50:22 -070051 *(.fixup)
Bryan Wu1394f032007-05-06 14:50:22 -070052
Mike Frysingerde6a9522007-06-11 17:27:05 +080053 . = ALIGN(16);
54 ___start___ex_table = .;
55 *(__ex_table)
56 ___stop___ex_table = .;
57
Bryan Wu1394f032007-05-06 14:50:22 -070058 . = ALIGN(4);
Bryan Wu1394f032007-05-06 14:50:22 -070059 __etext = .;
Mike Frysingerde6a9522007-06-11 17:27:05 +080060 }
Bryan Wu1394f032007-05-06 14:50:22 -070061
Mike Frysingerde6a9522007-06-11 17:27:05 +080062 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 = .;
Bryan Wu1394f032007-05-06 14:50:22 -070080 .init :
81 {
82 . = ALIGN(4096);
Bryan Wu1394f032007-05-06 14:50:22 -070083 __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);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800108 }
Bryan Wu1394f032007-05-06 14:50:22 -0700109
Mike Frysingerde6a9522007-06-11 17:27:05 +0800110 __l1_lma_start = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700111
Mike Frysingerde6a9522007-06-11 17:27:05 +0800112 .text_l1 L1_CODE_START : AT(LOADADDR(.init) + SIZEOF(.init))
Bryan Wu1394f032007-05-06 14:50:22 -0700113 {
114 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800115 __stext_l1 = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700116 *(.l1.text)
117
118 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800119 __etext_l1 = .;
120 }
Bryan Wu1394f032007-05-06 14:50:22 -0700121
Mike Frysingerde6a9522007-06-11 17:27:05 +0800122 .data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
Bryan Wu1394f032007-05-06 14:50:22 -0700123 {
124 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800125 __sdata_l1 = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700126 *(.l1.data)
Mike Frysingerde6a9522007-06-11 17:27:05 +0800127 __edata_l1 = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700128
129 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800130 __sbss_l1 = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700131 *(.l1.bss)
132
133 . = ALIGN(32);
134 *(.data_l1.cacheline_aligned)
135
136 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800137 __ebss_l1 = .;
138 }
139
140 .data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
Bryan Wu1394f032007-05-06 14:50:22 -0700141 {
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 = .;
Mike Frysingerde6a9522007-06-11 17:27:05 +0800153 }
Bryan Wu1394f032007-05-06 14:50:22 -0700154
Mike Frysingerde6a9522007-06-11 17:27:05 +0800155 ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
Bryan Wu1394f032007-05-06 14:50:22 -0700156
Mike Frysingerde6a9522007-06-11 17:27:05 +0800157 .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) :
Bryan Wu1394f032007-05-06 14:50:22 -0700158 {
159 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800160 ___bss_start = .;
Bryan Wu1394f032007-05-06 14:50:22 -0700161 *(.bss)
162 *(COMMON)
163 . = ALIGN(4);
Mike Frysingerde6a9522007-06-11 17:27:05 +0800164 ___bss_stop = .;
165 __end = .;
166 }
167
168 /DISCARD/ :
169 {
170 *(.exit.text)
171 *(.exit.data)
172 *(.exitcall.exit)
173 }
Bryan Wu1394f032007-05-06 14:50:22 -0700174}