Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[deliverable/linux.git] / arch / sh / kernel / vmlinux.lds.S
CommitLineData
1da177e4
LT
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 */
d153ea88 5#include <asm/thread_info.h>
87e29cac 6#include <asm/cache.h>
1da177e4
LT
7#include <asm-generic/vmlinux.lds.h>
8
9#ifdef CONFIG_CPU_LITTLE_ENDIAN
10OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
11#else
12OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
13#endif
14OUTPUT_ARCH(sh)
15ENTRY(_start)
16SECTIONS
17{
e7f93a35 18 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
1da177e4
LT
19 _text = .; /* Text and read-only data */
20 text = .; /* Text and read-only data */
21 .empty_zero_page : {
22 *(.empty_zero_page)
23 } = 0
24 .text : {
339547bf 25 *(.text.head)
7664709b 26 TEXT_TEXT
1da177e4
LT
27 SCHED_TEXT
28 LOCK_TEXT
29 *(.fixup)
30 *(.gnu.warning)
31 } = 0x0009
32
33 . = ALIGN(16); /* Exception table */
34 __start___ex_table = .;
35 __ex_table : { *(__ex_table) }
36 __stop___ex_table = .;
37
fa691511
PM
38 _etext = .; /* End of text section */
39
1da177e4
LT
40 RODATA
41
fa691511 42 BUG_TABLE
1da177e4
LT
43
44 .data : { /* Data */
ca967258 45 DATA_DATA
1da177e4
LT
46
47 /* Align the initial ramdisk image (INITRD) on page boundaries. */
d153ea88 48 . = ALIGN(PAGE_SIZE);
1da177e4
LT
49 __rd_start = .;
50 *(.initrd)
d153ea88 51 . = ALIGN(PAGE_SIZE);
1da177e4
LT
52 __rd_end = .;
53
54 CONSTRUCTORS
55 }
56
d153ea88 57 . = ALIGN(PAGE_SIZE);
f668f55c 58 .data.page_aligned : { *(.data.page_aligned) }
fa691511
PM
59 __nosave_begin = .;
60 .data_nosave : { *(.data.nosave) }
61 . = ALIGN(PAGE_SIZE);
62 __nosave_end = .;
1da177e4 63
5fb7dc37 64 PERCPU(PAGE_SIZE)
34973379
PM
65
66 . = ALIGN(L1_CACHE_BYTES);
1da177e4
LT
67 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
68
69 _edata = .; /* End of data section */
70
d153ea88 71 . = ALIGN(THREAD_SIZE); /* init_task */
1da177e4 72 .data.init_task : { *(.data.init_task) }
1da177e4 73
d153ea88 74 . = ALIGN(PAGE_SIZE); /* Init code and data */
1da177e4
LT
75 __init_begin = .;
76 _sinittext = .;
77 .init.text : { *(.init.text) }
78 _einittext = .;
79 .init.data : { *(.init.data) }
80 . = ALIGN(16);
81 __setup_start = .;
82 .init.setup : { *(.init.setup) }
83 __setup_end = .;
84 __initcall_start = .;
85 .initcall.init : {
61ce1efe 86 INITCALLS
1da177e4
LT
87 }
88 __initcall_end = .;
89 __con_initcall_start = .;
90 .con_initcall.init : { *(.con_initcall.init) }
91 __con_initcall_end = .;
92 SECURITY_INIT
67d38229 93
63482aaa
PM
94 /* .exit.text is discarded at runtime, not link time, to deal with
95 references from .rodata */
96 .exit.text : { *(.exit.text) }
97 .exit.data : { *(.exit.data) }
98
67d38229 99#ifdef CONFIG_BLK_DEV_INITRD
34973379
PM
100 . = ALIGN(PAGE_SIZE);
101
1da177e4
LT
102 __initramfs_start = .;
103 .init.ramfs : { *(.init.ramfs) }
104 __initramfs_end = .;
67d38229
JPS
105#endif
106
3a3c60fc 107 . = ALIGN(4);
1da177e4 108 __machvec_start = .;
9655ad03 109 .machvec.init : { *(.machvec.init) }
1da177e4 110 __machvec_end = .;
9655ad03 111
d153ea88 112 . = ALIGN(PAGE_SIZE);
e181127a
PM
113 .bss : {
114 __init_end = .;
115 __bss_start = .; /* BSS */
116 *(.bss.page_aligned)
117 *(.bss)
118 . = ALIGN(4);
1f91bbb5 119 _ebss = .; /* uClinux MTD sucks */
e181127a
PM
120 _end = . ;
121 }
1da177e4
LT
122
123 /* When something in the kernel is NOT compiled as a module, the
124 * module cleanup code and data are put into these segments. Both
125 * can then be thrown away, as cleanup code is never called unless
126 * it's a module.
127 */
128 /DISCARD/ : {
1da177e4
LT
129 *(.exitcall.exit)
130 }
131
fa691511
PM
132 STABS_DEBUG
133
134 DWARF_DEBUG
1da177e4 135}
This page took 0.532565 seconds and 5 git commands to generate.