aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/kernel/vmlinux.lds.S')
-rw-r--r--arch/microblaze/kernel/vmlinux.lds.S163
1 files changed, 163 insertions, 0 deletions
diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
new file mode 100644
index 000000000000..840385e51291
--- /dev/null
+++ b/arch/microblaze/kernel/vmlinux.lds.S
@@ -0,0 +1,163 @@
1/*
2 * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
3 * Copyright (C) 2008-2009 PetaLogix
4 * Copyright (C) 2006 Atmark Techno, Inc.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11OUTPUT_FORMAT("elf32-microblaze", "elf32-microblaze", "elf32-microblaze")
12OUTPUT_ARCH(microblaze)
13ENTRY(_start)
14
15#include <asm-generic/vmlinux.lds.h>
16
17jiffies = jiffies_64 + 4;
18
19SECTIONS {
20 . = CONFIG_KERNEL_BASE_ADDR;
21
22 .text : {
23 _text = . ;
24 _stext = . ;
25 *(.text .text.*)
26 *(.fixup)
27
28 *(.exitcall.exit)
29 SCHED_TEXT
30 LOCK_TEXT
31 KPROBES_TEXT
32 . = ALIGN (4) ;
33 _etext = . ;
34 }
35
36 . = ALIGN (4) ;
37 _fdt_start = . ; /* place for fdt blob */
38 . = . + 0x4000;
39 _fdt_end = . ;
40
41 . = ALIGN(16);
42 RODATA
43 . = ALIGN(16);
44 __ex_table : {
45 __start___ex_table = .;
46 *(__ex_table)
47 __stop___ex_table = .;
48 }
49
50 /*
51 * sdata2 section can go anywhere, but must be word aligned
52 * and SDA2_BASE must point to the middle of it
53 */
54 .sdata2 : {
55 _ssrw = .;
56 . = ALIGN(4096); /* page aligned when MMU used - origin 0x8 */
57 *(.sdata2)
58 . = ALIGN(8);
59 _essrw = .;
60 _ssrw_size = _essrw - _ssrw;
61 _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_size / 2);
62 }
63
64 _sdata = . ;
65 .data ALIGN (4096) : { /* page aligned when MMU used - origin 0x4 */
66 *(.data)
67 }
68 . = ALIGN(32);
69 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
70 _edata = . ;
71
72 /* Reserve some low RAM for r0 based memory references */
73 . = ALIGN(0x4) ;
74 r0_ram = . ;
75 . = . + 4096; /* a page should be enough */
76
77 /* The initial task */
78 . = ALIGN(8192);
79 .data.init_task : { *(.data.init_task) }
80
81 /* Under the microblaze ABI, .sdata and .sbss must be contiguous */
82 . = ALIGN(8);
83 .sdata : {
84 _ssro = .;
85 *(.sdata)
86 }
87
88 .sbss : {
89 _ssbss = .;
90 *(.sbss)
91 _esbss = .;
92 _essro = .;
93 _ssro_size = _essro - _ssro ;
94 _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ;
95 }
96
97 __init_begin = .;
98
99 . = ALIGN(4096);
100 .init.text : {
101 _sinittext = . ;
102 *(.init.text)
103 *(.exit.text)
104 *(.exit.data)
105 _einittext = .;
106 }
107
108 .init.data : { *(.init.data) }
109
110 . = ALIGN(4);
111 .init.ivt : {
112 __ivt_start = .;
113 *(.init.ivt)
114 __ivt_end = .;
115 }
116
117 .init.setup : {
118 __setup_start = .;
119 *(.init.setup)
120 __setup_end = .;
121 }
122
123 .initcall.init : {
124 __initcall_start = .;
125 INITCALLS
126 __initcall_end = .;
127 }
128
129 .con_initcall.init : {
130 __con_initcall_start = .;
131 *(.con_initcall.init)
132 __con_initcall_end = .;
133 }
134
135 __init_end_before_initramfs = .;
136
137 .init.ramfs ALIGN(4096) : {
138 __initramfs_start = .;
139 *(.init.ramfs)
140 __initramfs_end = .;
141 . = ALIGN(4);
142 LONG(0);
143/*
144 * FIXME this can break initramfs for MMU.
145 * Pad init.ramfs up to page boundary,
146 * so that __init_end == __bss_start. This will make image.elf
147 * consistent with the image.bin
148 */
149 /* . = ALIGN(4096); */
150 }
151 __init_end = .;
152
153 .bss ALIGN (4096) : { /* page aligned when MMU used */
154 __bss_start = . ;
155 *(.bss*)
156 *(COMMON)
157 . = ALIGN (4) ;
158 __bss_stop = . ;
159 _ebss = . ;
160 }
161 . = ALIGN(4096);
162 _end = .;
163}