]>
Commit | Line | Data |
---|---|---|
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 | |
10 | OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux") | |
11 | #else | |
12 | OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux") | |
13 | #endif | |
14 | OUTPUT_ARCH(sh) | |
15 | ENTRY(_start) | |
16 | SECTIONS | |
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 : { | |
7664709b | 25 | TEXT_TEXT |
1da177e4 LT |
26 | SCHED_TEXT |
27 | LOCK_TEXT | |
28 | *(.fixup) | |
29 | *(.gnu.warning) | |
30 | } = 0x0009 | |
31 | ||
32 | . = ALIGN(16); /* Exception table */ | |
33 | __start___ex_table = .; | |
34 | __ex_table : { *(__ex_table) } | |
35 | __stop___ex_table = .; | |
36 | ||
fa691511 PM |
37 | _etext = .; /* End of text section */ |
38 | ||
1da177e4 LT |
39 | RODATA |
40 | ||
fa691511 | 41 | BUG_TABLE |
1da177e4 LT |
42 | |
43 | .data : { /* Data */ | |
ca967258 | 44 | DATA_DATA |
1da177e4 LT |
45 | |
46 | /* Align the initial ramdisk image (INITRD) on page boundaries. */ | |
d153ea88 | 47 | . = ALIGN(PAGE_SIZE); |
1da177e4 LT |
48 | __rd_start = .; |
49 | *(.initrd) | |
d153ea88 | 50 | . = ALIGN(PAGE_SIZE); |
1da177e4 LT |
51 | __rd_end = .; |
52 | ||
53 | CONSTRUCTORS | |
54 | } | |
55 | ||
d153ea88 | 56 | . = ALIGN(PAGE_SIZE); |
f668f55c | 57 | .data.page_aligned : { *(.data.page_aligned) } |
fa691511 PM |
58 | __nosave_begin = .; |
59 | .data_nosave : { *(.data.nosave) } | |
60 | . = ALIGN(PAGE_SIZE); | |
61 | __nosave_end = .; | |
1da177e4 | 62 | |
5fb7dc37 | 63 | PERCPU(PAGE_SIZE) |
1da177e4 LT |
64 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } |
65 | ||
66 | _edata = .; /* End of data section */ | |
67 | ||
d153ea88 | 68 | . = ALIGN(THREAD_SIZE); /* init_task */ |
1da177e4 | 69 | .data.init_task : { *(.data.init_task) } |
1da177e4 | 70 | |
d153ea88 | 71 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
1da177e4 LT |
72 | __init_begin = .; |
73 | _sinittext = .; | |
74 | .init.text : { *(.init.text) } | |
75 | _einittext = .; | |
76 | .init.data : { *(.init.data) } | |
77 | . = ALIGN(16); | |
78 | __setup_start = .; | |
79 | .init.setup : { *(.init.setup) } | |
80 | __setup_end = .; | |
81 | __initcall_start = .; | |
82 | .initcall.init : { | |
61ce1efe | 83 | INITCALLS |
1da177e4 LT |
84 | } |
85 | __initcall_end = .; | |
86 | __con_initcall_start = .; | |
87 | .con_initcall.init : { *(.con_initcall.init) } | |
88 | __con_initcall_end = .; | |
89 | SECURITY_INIT | |
67d38229 JPS |
90 | |
91 | #ifdef CONFIG_BLK_DEV_INITRD | |
1da177e4 LT |
92 | __initramfs_start = .; |
93 | .init.ramfs : { *(.init.ramfs) } | |
94 | __initramfs_end = .; | |
67d38229 JPS |
95 | #endif |
96 | ||
3a3c60fc | 97 | . = ALIGN(4); |
1da177e4 | 98 | __machvec_start = .; |
9655ad03 | 99 | .machvec.init : { *(.machvec.init) } |
1da177e4 | 100 | __machvec_end = .; |
9655ad03 | 101 | |
d153ea88 | 102 | . = ALIGN(PAGE_SIZE); |
e181127a PM |
103 | .bss : { |
104 | __init_end = .; | |
105 | __bss_start = .; /* BSS */ | |
106 | *(.bss.page_aligned) | |
107 | *(.bss) | |
108 | . = ALIGN(4); | |
109 | _end = . ; | |
110 | } | |
1da177e4 LT |
111 | |
112 | /* When something in the kernel is NOT compiled as a module, the | |
113 | * module cleanup code and data are put into these segments. Both | |
114 | * can then be thrown away, as cleanup code is never called unless | |
115 | * it's a module. | |
116 | */ | |
117 | /DISCARD/ : { | |
1da177e4 LT |
118 | *(.exitcall.exit) |
119 | } | |
120 | ||
fa691511 PM |
121 | STABS_DEBUG |
122 | ||
123 | DWARF_DEBUG | |
1da177e4 | 124 | } |