diff options
author | Ley Foon Tan <lftan@altera.com> | 2014-11-06 02:20:19 -0500 |
---|---|---|
committer | Ley Foon Tan <lftan@altera.com> | 2014-12-07 23:56:06 -0500 |
commit | 2fc8483fdcde767795402a38a53e647811dc9abf (patch) | |
tree | 01c734b5191c6ddd5c095fb2a08494720b06f817 /arch/nios2/kernel/vmlinux.lds.S | |
parent | 9cce02ec7146248862ba63a41bf8eb32d9e4fb63 (diff) |
nios2: Build infrastructure
This patch adds Makefile and Kconfig files required for building a
nios2 kernel.
Signed-off-by: Ley Foon Tan <lftan@altera.com>
Diffstat (limited to 'arch/nios2/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/nios2/kernel/vmlinux.lds.S | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/arch/nios2/kernel/vmlinux.lds.S b/arch/nios2/kernel/vmlinux.lds.S new file mode 100644 index 000000000000..326fab40a9de --- /dev/null +++ b/arch/nios2/kernel/vmlinux.lds.S | |||
@@ -0,0 +1,75 @@ | |||
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 | |||
23 | OUTPUT_FORMAT("elf32-littlenios2", "elf32-littlenios2", "elf32-littlenios2") | ||
24 | |||
25 | OUTPUT_ARCH(nios) | ||
26 | ENTRY(_start) /* Defined in head.S */ | ||
27 | |||
28 | jiffies = jiffies_64; | ||
29 | |||
30 | SECTIONS | ||
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 | LOCK_TEXT | ||
41 | IRQENTRY_TEXT | ||
42 | KPROBES_TEXT | ||
43 | } =0 | ||
44 | _etext = .; | ||
45 | |||
46 | .got : { | ||
47 | *(.got.plt) | ||
48 | *(.igot.plt) | ||
49 | *(.got) | ||
50 | *(.igot) | ||
51 | } | ||
52 | |||
53 | EXCEPTION_TABLE(L1_CACHE_BYTES) | ||
54 | |||
55 | . = ALIGN(PAGE_SIZE); | ||
56 | __init_begin = .; | ||
57 | INIT_TEXT_SECTION(PAGE_SIZE) | ||
58 | INIT_DATA_SECTION(PAGE_SIZE) | ||
59 | PERCPU_SECTION(L1_CACHE_BYTES) | ||
60 | __init_end = .; | ||
61 | |||
62 | _sdata = .; | ||
63 | RO_DATA_SECTION(PAGE_SIZE) | ||
64 | RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) | ||
65 | _edata = .; | ||
66 | |||
67 | BSS_SECTION(0, 0, 0) | ||
68 | _end = .; | ||
69 | |||
70 | STABS_DEBUG | ||
71 | DWARF_DEBUG | ||
72 | NOTES | ||
73 | |||
74 | DISCARDS | ||
75 | } | ||