blob: 15a6f36c06db9c7c84db8d4698339f3f8d9ba413 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* ld script to make M32R Linux kernel
2 */
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#include <asm-generic/vmlinux.lds.h>
5#include <asm/addrspace.h>
6#include <asm/page.h>
7
8OUTPUT_ARCH(m32r)
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#if defined(__LITTLE_ENDIAN__)
10 jiffies = jiffies_64;
11#else
12 jiffies = jiffies_64 + 4;
13#endif
Hirokazu Takata3d60f842007-02-10 01:43:39 -080014
15kernel_entry = boot - 0x80000000;
16ENTRY(kernel_entry)
17
Linus Torvalds1da177e2005-04-16 15:20:36 -070018SECTIONS
19{
20 . = CONFIG_MEMORY_START + __PAGE_OFFSET;
21 eit_vector = .;
22
23 . = . + 0x1000;
24 .empty_zero_page : { *(.empty_zero_page) } = 0
25
26 /* read-only */
27 _text = .; /* Text and read-only data */
28 .boot : { *(.boot) } = 0
29 .text : {
Sam Ravnborg76647092007-05-13 00:31:33 +020030 TEXT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070031 SCHED_TEXT
32 LOCK_TEXT
33 *(.fixup)
34 *(.gnu.warning)
35 } = 0x9090
36#ifdef CONFIG_SMP
37 . = ALIGN(65536);
38 .eit_vector4 : { *(.eit_vector4) }
39#endif
40 _etext = .; /* End of text section */
41
42 . = ALIGN(16); /* Exception table */
43 __start___ex_table = .;
44 __ex_table : { *(__ex_table) }
45 __stop___ex_table = .;
46
47 RODATA
48
49 /* writeable */
50 .data : { /* Data */
51 *(.spu)
52 *(.spi)
Sam Ravnborgca967252007-05-17 13:38:44 +020053 DATA_DATA
Linus Torvalds1da177e2005-04-16 15:20:36 -070054 CONSTRUCTORS
55 }
56
57 . = ALIGN(4096);
58 __nosave_begin = .;
59 .data_nosave : { *(.data.nosave) }
60 . = ALIGN(4096);
61 __nosave_end = .;
62
Linus Torvalds1da177e2005-04-16 15:20:36 -070063 . = ALIGN(32);
64 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
65
66 _edata = .; /* End of data section */
67
68 . = ALIGN(8192); /* init_task */
69 .data.init_task : { *(.data.init_task) }
70
71 /* will be freed after init */
72 . = ALIGN(4096); /* Init code and data */
73 __init_begin = .;
74 .init.text : {
75 _sinittext = .;
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010076 INIT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070077 _einittext = .;
78 }
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010079 .init.data : { INIT_DATA }
Linus Torvalds1da177e2005-04-16 15:20:36 -070080 . = ALIGN(16);
81 __setup_start = .;
82 .init.setup : { *(.init.setup) }
83 __setup_end = .;
84 __initcall_start = .;
85 .initcall.init : {
Andrew Morton61ce1ef2006-10-27 11:41:44 -070086 INITCALLS
Linus Torvalds1da177e2005-04-16 15:20:36 -070087 }
88 __initcall_end = .;
89 __con_initcall_start = .;
90 .con_initcall.init : { *(.con_initcall.init) }
91 __con_initcall_end = .;
92 SECURITY_INIT
93 . = ALIGN(4);
94 __alt_instructions = .;
95 .altinstructions : { *(.altinstructions) }
96 __alt_instructions_end = .;
97 .altinstr_replacement : { *(.altinstr_replacement) }
98 /* .exit.text is discard at runtime, not link time, to deal with references
99 from .altinstructions and .eh_frame */
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100100 .exit.text : { EXIT_TEXT }
101 .exit.data : { EXIT_DATA }
Jean-Paul Saman67d38222007-02-10 01:44:44 -0800102
103#ifdef CONFIG_BLK_DEV_INITRD
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104 . = ALIGN(4096);
105 __initramfs_start = .;
106 .init.ramfs : { *(.init.ramfs) }
107 __initramfs_end = .;
Jean-Paul Saman67d38222007-02-10 01:44:44 -0800108#endif
109
Fenghua Yu5fb7dc32007-07-19 01:48:12 -0700110 PERCPU(4096)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111 . = ALIGN(4096);
112 __init_end = .;
113 /* freed after init ends here */
114
115 __bss_start = .; /* BSS */
116 .bss : { *(.bss) }
117 . = ALIGN(4);
118 __bss_stop = .;
119
120 _end = . ;
121
122 /* Sections to be discarded */
123 /DISCARD/ : {
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100124 EXIT_TEXT
125 EXIT_DATA
Linus Torvalds1da177e2005-04-16 15:20:36 -0700126 *(.exitcall.exit)
127 }
128
129 /* Stabs debugging sections. */
130 .stab 0 : { *(.stab) }
131 .stabstr 0 : { *(.stabstr) }
132 .stab.excl 0 : { *(.stab.excl) }
133 .stab.exclstr 0 : { *(.stab.exclstr) }
134 .stab.index 0 : { *(.stab.index) }
135 .stab.indexstr 0 : { *(.stab.indexstr) }
136 .comment 0 : { *(.comment) }
137}