xref: /openbmc/linux/arch/nios2/kernel/vmlinux.lds.S (revision 74ce1896)
1/*
2 * Copyright (C) 2009 Thomas Chou <thomas@wytron.com.tw>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 *
17 */
18#include <asm/page.h>
19#include <asm-generic/vmlinux.lds.h>
20#include <asm/cache.h>
21#include <asm/thread_info.h>
22
23OUTPUT_FORMAT("elf32-littlenios2", "elf32-littlenios2", "elf32-littlenios2")
24
25OUTPUT_ARCH(nios)
26ENTRY(_start)	/* Defined in head.S */
27
28jiffies = jiffies_64;
29
30SECTIONS
31{
32	. = CONFIG_NIOS2_MEM_BASE | CONFIG_NIOS2_KERNEL_REGION_BASE;
33
34	_text = .;
35	_stext = .;
36	HEAD_TEXT_SECTION
37	.text : {
38		TEXT_TEXT
39		SCHED_TEXT
40		CPUIDLE_TEXT
41		LOCK_TEXT
42		IRQENTRY_TEXT
43		SOFTIRQENTRY_TEXT
44		KPROBES_TEXT
45	} =0
46	_etext = .;
47
48	.got : {
49		*(.got.plt)
50		*(.igot.plt)
51		*(.got)
52		*(.igot)
53	}
54
55	EXCEPTION_TABLE(L1_CACHE_BYTES)
56
57	. = ALIGN(PAGE_SIZE);
58	__init_begin = .;
59	INIT_TEXT_SECTION(PAGE_SIZE)
60	INIT_DATA_SECTION(PAGE_SIZE)
61	PERCPU_SECTION(L1_CACHE_BYTES)
62	__init_end = .;
63
64	_sdata = .;
65	RO_DATA_SECTION(PAGE_SIZE)
66	RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
67	_edata = .;
68
69	BSS_SECTION(0, 0, 0)
70	_end = .;
71
72	STABS_DEBUG
73	DWARF_DEBUG
74	NOTES
75
76	DISCARDS
77}
78