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.S155
1 files changed, 155 insertions, 0 deletions
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
new file mode 100644
index 000000000000..51bdc1cf7838
--- /dev/null
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -0,0 +1,155 @@
1/* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $
2 * ld script to make SuperH Linux kernel
3 * Written by Niibe Yutaka
4 */
5#include <linux/config.h>
6#include <asm-generic/vmlinux.lds.h>
7
8#ifdef CONFIG_CPU_LITTLE_ENDIAN
9OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
10#else
11OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
12#endif
13OUTPUT_ARCH(sh)
14ENTRY(_start)
15SECTIONS
16{
17 . = 0x80000000 + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
18 _text = .; /* Text and read-only data */
19 text = .; /* Text and read-only data */
20 .empty_zero_page : {
21 *(.empty_zero_page)
22 } = 0
23 .text : {
24 *(.text)
25 SCHED_TEXT
26 LOCK_TEXT
27 *(.fixup)
28 *(.gnu.warning)
29 } = 0x0009
30
31 . = ALIGN(16); /* Exception table */
32 __start___ex_table = .;
33 __ex_table : { *(__ex_table) }
34 __stop___ex_table = .;
35
36 RODATA
37
38 _etext = .; /* End of text section */
39
40 .data : { /* Data */
41 *(.data)
42
43 /* Align the initial ramdisk image (INITRD) on page boundaries. */
44 . = ALIGN(4096);
45 __rd_start = .;
46 *(.initrd)
47 . = ALIGN(4096);
48 __rd_end = .;
49
50 CONSTRUCTORS
51 }
52
53 . = ALIGN(4096);
54 .data.page_aligned : { *(.data.idt) }
55
56 . = ALIGN(32);
57 __per_cpu_start = .;
58 .data.percpu : { *(.data.percpu) }
59 __per_cpu_end = .;
60 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
61
62 _edata = .; /* End of data section */
63
64 . = ALIGN(8192); /* init_task */
65 .data.init_task : { *(.data.init_task) }
66 /* stack */
67 .stack : { stack = .; _stack = .; }
68
69 . = ALIGN(4096); /* Init code and data */
70 __init_begin = .;
71 _sinittext = .;
72 .init.text : { *(.init.text) }
73 _einittext = .;
74 .init.data : { *(.init.data) }
75 . = ALIGN(16);
76 __setup_start = .;
77 .init.setup : { *(.init.setup) }
78 __setup_end = .;
79 __initcall_start = .;
80 .initcall.init : {
81 *(.initcall1.init)
82 *(.initcall2.init)
83 *(.initcall3.init)
84 *(.initcall4.init)
85 *(.initcall5.init)
86 *(.initcall6.init)
87 *(.initcall7.init)
88 }
89 __initcall_end = .;
90 __con_initcall_start = .;
91 .con_initcall.init : { *(.con_initcall.init) }
92 __con_initcall_end = .;
93 SECURITY_INIT
94 __initramfs_start = .;
95 .init.ramfs : { *(.init.ramfs) }
96 __initramfs_end = .;
97 __machvec_start = .;
98 .init.machvec : { *(.init.machvec) }
99 __machvec_end = .;
100 . = ALIGN(4096);
101 __init_end = .;
102
103 . = ALIGN(4);
104 __bss_start = .; /* BSS */
105 .bss : { *(.bss) }
106
107 . = ALIGN(4);
108 _end = . ;
109
110 /* When something in the kernel is NOT compiled as a module, the
111 * module cleanup code and data are put into these segments. Both
112 * can then be thrown away, as cleanup code is never called unless
113 * it's a module.
114 */
115 /DISCARD/ : {
116 *(.exit.text)
117 *(.exit.data)
118 *(.exitcall.exit)
119 }
120
121 /* Stabs debugging sections. */
122 .stab 0 : { *(.stab) }
123 .stabstr 0 : { *(.stabstr) }
124 .stab.excl 0 : { *(.stab.excl) }
125 .stab.exclstr 0 : { *(.stab.exclstr) }
126 .stab.index 0 : { *(.stab.index) }
127 .stab.indexstr 0 : { *(.stab.indexstr) }
128 .comment 0 : { *(.comment) }
129 /* DWARF debug sections.
130 Symbols in the DWARF debugging section are relative to the beginning
131 of the section so we begin .debug at 0. */
132 /* DWARF 1 */
133 .debug 0 : { *(.debug) }
134 .line 0 : { *(.line) }
135 /* GNU DWARF 1 extensions */
136 .debug_srcinfo 0 : { *(.debug_srcinfo) }
137 .debug_sfnames 0 : { *(.debug_sfnames) }
138 /* DWARF 1.1 and DWARF 2 */
139 .debug_aranges 0 : { *(.debug_aranges) }
140 .debug_pubnames 0 : { *(.debug_pubnames) }
141 /* DWARF 2 */
142 .debug_info 0 : { *(.debug_info) }
143 .debug_abbrev 0 : { *(.debug_abbrev) }
144 .debug_line 0 : { *(.debug_line) }
145 .debug_frame 0 : { *(.debug_frame) }
146 .debug_str 0 : { *(.debug_str) }
147 .debug_loc 0 : { *(.debug_loc) }
148 .debug_macinfo 0 : { *(.debug_macinfo) }
149 /* SGI/MIPS DWARF 2 extensions */
150 .debug_weaknames 0 : { *(.debug_weaknames) }
151 .debug_funcnames 0 : { *(.debug_funcnames) }
152 .debug_typenames 0 : { *(.debug_typenames) }
153 .debug_varnames 0 : { *(.debug_varnames) }
154 /* These must appear regardless of . */
155}