aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/vmlinux.lds.S')
-rw-r--r--arch/sh/kernel/vmlinux.lds.S179
1 files changed, 176 insertions, 3 deletions
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index d7d4991f32af..f53c76acaede 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -1,5 +1,178 @@
1#ifdef CONFIG_SUPERH32 1/*
2# include "vmlinux_32.lds.S" 2 * ld script to make SuperH Linux kernel
3 * Written by Niibe Yutaka and Paul Mundt
4 */
5#ifdef CONFIG_SUPERH64
6#define LOAD_OFFSET CONFIG_PAGE_OFFSET
7OUTPUT_ARCH(sh:sh5)
3#else 8#else
4# include "vmlinux_64.lds.S" 9#define LOAD_OFFSET 0
10OUTPUT_ARCH(sh)
5#endif 11#endif
12
13#include <asm/thread_info.h>
14#include <asm/cache.h>
15#include <asm-generic/vmlinux.lds.h>
16
17ENTRY(_start)
18SECTIONS
19{
20#ifdef CONFIG_PMB_FIXED
21 . = CONFIG_PAGE_OFFSET + (CONFIG_MEMORY_START & 0x1fffffff) +
22 CONFIG_ZERO_PAGE_OFFSET;
23#elif defined(CONFIG_32BIT)
24 . = CONFIG_PAGE_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
25#else
26 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
27#endif
28
29 _text = .; /* Text and read-only data */
30
31 .empty_zero_page : AT(ADDR(.empty_zero_page) - LOAD_OFFSET) {
32 *(.empty_zero_page)
33 } = 0
34
35 .text : AT(ADDR(.text) - LOAD_OFFSET) {
36 HEAD_TEXT
37 TEXT_TEXT
38
39#ifdef CONFIG_SUPERH64
40 *(.text64)
41 *(.text..SHmedia32)
42#endif
43
44 SCHED_TEXT
45 LOCK_TEXT
46 KPROBES_TEXT
47 IRQENTRY_TEXT
48 *(.fixup)
49 *(.gnu.warning)
50 _etext = .; /* End of text section */
51 } = 0x0009
52
53 . = ALIGN(16); /* Exception table */
54 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
55 __start___ex_table = .;
56 *(__ex_table)
57 __stop___ex_table = .;
58 }
59
60 NOTES
61 RO_DATA(PAGE_SIZE)
62
63 /*
64 * Code which must be executed uncached and the associated data
65 */
66 . = ALIGN(PAGE_SIZE);
67 .uncached : AT(ADDR(.uncached) - LOAD_OFFSET) {
68 __uncached_start = .;
69 *(.uncached.text)
70 *(.uncached.data)
71 __uncached_end = .;
72 }
73
74 . = ALIGN(THREAD_SIZE);
75 .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
76 *(.data.init_task)
77
78 . = ALIGN(L1_CACHE_BYTES);
79 *(.data.cacheline_aligned)
80
81 . = ALIGN(L1_CACHE_BYTES);
82 *(.data.read_mostly)
83
84 . = ALIGN(PAGE_SIZE);
85 *(.data.page_aligned)
86
87 __nosave_begin = .;
88 *(.data.nosave)
89 . = ALIGN(PAGE_SIZE);
90 __nosave_end = .;
91
92 DATA_DATA
93 CONSTRUCTORS
94 }
95
96 _edata = .; /* End of data section */
97
98 . = ALIGN(PAGE_SIZE); /* Init code and data */
99 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
100 __init_begin = .;
101 _sinittext = .;
102 INIT_TEXT
103 _einittext = .;
104 }
105
106 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { INIT_DATA }
107
108 . = ALIGN(16);
109 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
110 __setup_start = .;
111 *(.init.setup)
112 __setup_end = .;
113 }
114
115 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
116 __initcall_start = .;
117 INITCALLS
118 __initcall_end = .;
119 }
120
121 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
122 __con_initcall_start = .;
123 *(.con_initcall.init)
124 __con_initcall_end = .;
125 }
126
127 SECURITY_INIT
128
129#ifdef CONFIG_BLK_DEV_INITRD
130 . = ALIGN(PAGE_SIZE);
131 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
132 __initramfs_start = .;
133 *(.init.ramfs)
134 __initramfs_end = .;
135 }
136#endif
137
138 . = ALIGN(4);
139 .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) {
140 __machvec_start = .;
141 *(.machvec.init)
142 __machvec_end = .;
143 }
144
145 PERCPU(PAGE_SIZE)
146
147 /*
148 * .exit.text is discarded at runtime, not link time, to deal with
149 * references from __bug_table
150 */
151 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { EXIT_TEXT }
152 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA }
153
154 . = ALIGN(PAGE_SIZE);
155 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
156 __init_end = .;
157 __bss_start = .; /* BSS */
158 *(.bss.page_aligned)
159 *(.bss)
160 *(COMMON)
161 . = ALIGN(4);
162 _ebss = .; /* uClinux MTD sucks */
163 _end = . ;
164 }
165
166 /*
167 * When something in the kernel is NOT compiled as a module, the
168 * module cleanup code and data are put into these segments. Both
169 * can then be thrown away, as cleanup code is never called unless
170 * it's a module.
171 */
172 /DISCARD/ : {
173 *(.exitcall.exit)
174 }
175
176 STABS_DEBUG
177 DWARF_DEBUG
178}