vmlinux.lds.S 3.6 KB
Newer Older
B
Bryan Wu 已提交
1 2 3 4 5 6 7 8 9
/*
 * File:         arch/blackfin/kernel/vmlinux.lds.S
 * Based on:     none - original work
 * Author:
 *
 * Created:      Tue Sep 21 2004
 * Description:  Master linker script for blackfin architecture
 *
 * Modified:
10
 *               Copyright 2004-2007 Analog Devices Inc.
B
Bryan Wu 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
 *
 * Bugs:         Enter bugs at http://blackfin.uclinux.org/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see the file COPYING, or write
 * to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

#define VMLINUX_SYMBOL(_sym_) _##_sym_

#include <asm-generic/vmlinux.lds.h>
#include <asm/mem_map.h>
34
#include <asm/page.h>
35
#include <asm/thread_info.h>
B
Bryan Wu 已提交
36 37 38 39 40 41 42 43 44 45

OUTPUT_FORMAT("elf32-bfin")
ENTRY(__start)
_jiffies = _jiffies_64;

SECTIONS
{
	. = CONFIG_BOOT_LOAD;
	.text :
	{
46 47 48
		__text = .;
		_text = .;
		__stext = .;
49
		TEXT_TEXT
B
Bryan Wu 已提交
50
		SCHED_TEXT
51
		LOCK_TEXT
52 53
		KPROBES_TEXT
		*(.text.*)
54 55
		*(.fixup)

B
Bryan Wu 已提交
56
		. = ALIGN(16);
57
		___start___ex_table = .;
B
Bryan Wu 已提交
58
		*(__ex_table)
59
		___stop___ex_table = .;
B
Bryan Wu 已提交
60 61 62

		. = ALIGN(4);
		__etext = .;
63 64
	}

65
	RO_DATA(PAGE_SIZE)
66 67 68

	.data :
	{
69 70 71 72
		/* make sure the init_task is aligned to the
		 * kernel thread size so we can locate the kernel
		 * stack properly and quickly.
		 */
73
		__sdata = .;
74
		. = ALIGN(THREAD_SIZE);
75 76 77 78 79
		*(.data.init_task)

		. = ALIGN(32);
		*(.data.cacheline_aligned)

80 81 82 83
		DATA_DATA
		*(.data.*)
		CONSTRUCTORS

84
		. = ALIGN(THREAD_SIZE);
85 86
		__edata = .;
	}
B
Bryan Wu 已提交
87

88
	___init_begin = .;
89 90

	.init.text :
B
Bryan Wu 已提交
91
	{
92
		. = ALIGN(PAGE_SIZE);
B
Bryan Wu 已提交
93 94 95
		__sinittext = .;
		*(.init.text)
		__einittext = .;
96 97 98 99
	}
	.init.data :
	{
		. = ALIGN(16);
B
Bryan Wu 已提交
100
		*(.init.data)
101 102 103
	}
	.init.setup :
	{
B
Bryan Wu 已提交
104 105 106 107
		. = ALIGN(16);
		___setup_start = .;
		*(.init.setup)
		___setup_end = .;
108 109 110
	}
	.initcall.init :
	{
B
Bryan Wu 已提交
111 112 113
		___initcall_start = .;
		INITCALLS
		___initcall_end = .;
114 115 116
	}
	.con_initcall.init :
	{
B
Bryan Wu 已提交
117 118 119
		___con_initcall_start = .;
		*(.con_initcall.init)
		___con_initcall_end = .;
120 121 122 123
	}
	SECURITY_INIT
	.init.ramfs :
	{
B
Bryan Wu 已提交
124 125 126 127
		. = ALIGN(4);
		___initramfs_start = .;
		*(.init.ramfs)
		___initramfs_end = .;
128
	}
B
Bryan Wu 已提交
129

130
	__l1_lma_start = .;
B
Bryan Wu 已提交
131

132
	.text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs))
B
Bryan Wu 已提交
133 134
	{
		. = ALIGN(4);
135
		__stext_l1 = .;
B
Bryan Wu 已提交
136 137 138
		*(.l1.text)

		. = ALIGN(4);
139 140
		__etext_l1 = .;
	}
B
Bryan Wu 已提交
141

142
	.data_l1 L1_DATA_A_START : AT(LOADADDR(.text_l1) + SIZEOF(.text_l1))
B
Bryan Wu 已提交
143 144
	{
		. = ALIGN(4);
145
		__sdata_l1 = .;
B
Bryan Wu 已提交
146
		*(.l1.data)
147
		__edata_l1 = .;
B
Bryan Wu 已提交
148 149

		. = ALIGN(4);
150
		__sbss_l1 = .;
B
Bryan Wu 已提交
151 152 153 154 155 156
		*(.l1.bss)

		. = ALIGN(32);
		*(.data_l1.cacheline_aligned)

		. = ALIGN(4);
157 158 159 160
		__ebss_l1 = .;
	}

	.data_b_l1 L1_DATA_B_START : AT(LOADADDR(.data_l1) + SIZEOF(.data_l1))
B
Bryan Wu 已提交
161 162 163 164 165 166 167 168 169 170 171 172
	{
		. = ALIGN(4);
		__sdata_b_l1 = .;
		*(.l1.data.B)
		__edata_b_l1 = .;

		. = ALIGN(4);
		__sbss_b_l1 = .;
		*(.l1.bss.B)

		. = ALIGN(4);
		__ebss_b_l1 = .;
173
	}
B
Bryan Wu 已提交
174

175 176 177 178 179 180 181 182
	/* Force trailing alignment of our init section so that when we
	 * free our init memory, we don't leave behind a partial page.
	 */
	. = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
	. = ALIGN(PAGE_SIZE);
	___init_end = .;

	.bss :
B
Bryan Wu 已提交
183 184
	{
		. = ALIGN(4);
185
		___bss_start = .;
186
		*(.bss .bss.*)
B
Bryan Wu 已提交
187 188
		*(COMMON)
		. = ALIGN(4);
189 190 191 192
		___bss_stop = .;
		__end = .;
	}

193 194 195 196 197 198
	STABS_DEBUG

	DWARF_DEBUG

	NOTES

199 200 201 202 203 204
	/DISCARD/ :
	{
		*(.exit.text)
		*(.exit.data)
		*(.exitcall.exit)
	}
B
Bryan Wu 已提交
205
}