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