aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh64/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh64/kernel/vmlinux.lds.S')
-rw-r--r--arch/sh64/kernel/vmlinux.lds.S181
1 files changed, 181 insertions, 0 deletions
diff --git a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S
new file mode 100644
index 000000000000..7d9f7a6339a0
--- /dev/null
+++ b/arch/sh64/kernel/vmlinux.lds.S
@@ -0,0 +1,181 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * arch/sh5/vmlinux.lds.S
7 *
8 * ld script to make ST50 Linux kernel
9 *
10 * Copyright (C) 2000, 2001 Paolo Alberelli
11 *
12 * benedict.gaster@superh.com: 2nd May 2002
13 * Add definition of empty_zero_page to be the first page of kernel image.
14 *
15 * benedict.gaster@superh.com: 3rd May 2002
16 * Added support for ramdisk, removing statically linked romfs at the same time.
17 *
18 * lethal@linux-sh.org: 9th May 2003
19 * Kill off GLOBAL_NAME() usage and other CDC-isms.
20 *
21 * lethal@linux-sh.org: 19th May 2003
22 * Remove support for ancient toolchains.
23 */
24
25#include <linux/config.h>
26#include <asm/page.h>
27#include <asm/cache.h>
28#include <asm/processor.h>
29#include <asm/thread_info.h>
30
31#define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET
32#include <asm-generic/vmlinux.lds.h>
33
34#ifdef NOTDEF
35#ifdef CONFIG_LITTLE_ENDIAN
36OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux")
37#else
38OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64")
39#endif
40#endif
41
42OUTPUT_ARCH(sh:sh5)
43
44#define C_PHYS(x) AT (ADDR(x) - LOAD_OFFSET)
45
46ENTRY(__start)
47SECTIONS
48{
49 . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE;
50 _text = .; /* Text and read-only data */
51 text = .; /* Text and read-only data */
52
53 .empty_zero_page : C_PHYS(.empty_zero_page) {
54 *(.empty_zero_page)
55 } = 0
56
57 .text : C_PHYS(.text) {
58 *(.text)
59 *(.text64)
60 *(.text..SHmedia32)
61 SCHED_TEXT
62 LOCK_TEXT
63 *(.fixup)
64 *(.gnu.warning)
65#ifdef CONFIG_LITTLE_ENDIAN
66 } = 0x6ff0fff0
67#else
68 } = 0xf0fff06f
69#endif
70
71 /* We likely want __ex_table to be Cache Line aligned */
72 . = ALIGN(L1_CACHE_BYTES); /* Exception table */
73 __start___ex_table = .;
74 __ex_table : C_PHYS(__ex_table) { *(__ex_table) }
75 __stop___ex_table = .;
76
77 RODATA
78
79 _etext = .; /* End of text section */
80
81 .data : C_PHYS(.data) { /* Data */
82 *(.data)
83 CONSTRUCTORS
84 }
85
86 . = ALIGN(PAGE_SIZE);
87 .data.page_aligned : C_PHYS(.data.page_aligned) { *(.data.page_aligned) }
88
89 . = ALIGN(L1_CACHE_BYTES);
90 __per_cpu_start = .;
91 .data.percpu : C_PHYS(.data.percpu) { *(.data.percpu) }
92 __per_cpu_end = . ;
93 .data.cacheline_aligned : C_PHYS(.data.cacheline_aligned) { *(.data.cacheline_aligned) }
94
95 _edata = .; /* End of data section */
96
97 . = ALIGN(THREAD_SIZE); /* init_task: structure size aligned */
98 .data.init_task : C_PHYS(.data.init_task) { *(.data.init_task) }
99
100 . = ALIGN(PAGE_SIZE); /* Init code and data */
101 __init_begin = .;
102 _sinittext = .;
103 .init.text : C_PHYS(.init.text) { *(.init.text) }
104 _einittext = .;
105 .init.data : C_PHYS(.init.data) { *(.init.data) }
106 . = ALIGN(L1_CACHE_BYTES); /* Better if Cache Line aligned */
107 __setup_start = .;
108 .init.setup : C_PHYS(.init.setup) { *(.init.setup) }
109 __setup_end = .;
110 __initcall_start = .;
111 .initcall.init : C_PHYS(.initcall.init) {
112 *(.initcall1.init)
113 *(.initcall2.init)
114 *(.initcall3.init)
115 *(.initcall4.init)
116 *(.initcall5.init)
117 *(.initcall6.init)
118 *(.initcall7.init)
119 }
120 __initcall_end = .;
121 __con_initcall_start = .;
122 .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) }
123 __con_initcall_end = .;
124 SECURITY_INIT
125 __initramfs_start = .;
126 .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) }
127 __initramfs_end = .;
128 . = ALIGN(PAGE_SIZE);
129 __init_end = .;
130
131 /* Align to the biggest single data representation, head and tail */
132 . = ALIGN(8);
133 __bss_start = .; /* BSS */
134 .bss : C_PHYS(.bss) {
135 *(.bss)
136 }
137 . = ALIGN(8);
138 _end = . ;
139
140 /* Sections to be discarded */
141 /DISCARD/ : {
142 *(.exit.text)
143 *(.exit.data)
144 *(.exitcall.exit)
145 }
146
147 /* Stabs debugging sections. */
148 .stab 0 : C_PHYS(.stab) { *(.stab) }
149 .stabstr 0 : C_PHYS(.stabstr) { *(.stabstr) }
150 .stab.excl 0 : C_PHYS(.stab.excl) { *(.stab.excl) }
151 .stab.exclstr 0 : C_PHYS(.stab.exclstr) { *(.stab.exclstr) }
152 .stab.index 0 : C_PHYS(.stab.index) { *(.stab.index) }
153 .stab.indexstr 0 : C_PHYS(.stab.indexstr) { *(.stab.indexstr) }
154 .comment 0 : C_PHYS(.comment) { *(.comment) }
155 /* DWARF debug sections.
156 Symbols in the DWARF debugging section are relative to the beginning
157 of the section so we begin .debug at 0. */
158 /* DWARF 1 */
159 .debug 0 : C_PHYS(.debug) { *(.debug) }
160 .line 0 : C_PHYS(.line) { *(.line) }
161 /* GNU DWARF 1 extensions */
162 .debug_srcinfo 0 : C_PHYS(.debug_srcinfo) { *(.debug_srcinfo) }
163 .debug_sfnames 0 : C_PHYS(.debug_sfnames) { *(.debug_sfnames) }
164 /* DWARF 1.1 and DWARF 2 */
165 .debug_aranges 0 : C_PHYS(.debug_aranges) { *(.debug_aranges) }
166 .debug_pubnames 0 : C_PHYS(.debug_pubnames) { *(.debug_pubnames) }
167 /* DWARF 2 */
168 .debug_info 0 : C_PHYS(.debug_info) { *(.debug_info) }
169 .debug_abbrev 0 : C_PHYS(.debug_abbrev) { *(.debug_abbrev) }
170 .debug_line 0 : C_PHYS(.debug_line) { *(.debug_line) }
171 .debug_frame 0 : C_PHYS(.debug_frame) { *(.debug_frame) }
172 .debug_str 0 : C_PHYS(.debug_str) { *(.debug_str) }
173 .debug_loc 0 : C_PHYS(.debug_loc) { *(.debug_loc) }
174 .debug_macinfo 0 : C_PHYS(.debug_macinfo) { *(.debug_macinfo) }
175 /* SGI/MIPS DWARF 2 extensions */
176 .debug_weaknames 0 : C_PHYS(.debug_weaknames) { *(.debug_weaknames) }
177 .debug_funcnames 0 : C_PHYS(.debug_funcnames) { *(.debug_funcnames) }
178 .debug_typenames 0 : C_PHYS(.debug_typenames) { *(.debug_typenames) }
179 .debug_varnames 0 : C_PHYS(.debug_varnames) { *(.debug_varnames) }
180 /* These must appear regardless of . */
181}