Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* ld script to make M32R Linux kernel |
2 | */ | |
3 | ||
1da177e4 LT |
4 | #include <asm-generic/vmlinux.lds.h> |
5 | #include <asm/addrspace.h> | |
6 | #include <asm/page.h> | |
7 | ||
8 | OUTPUT_ARCH(m32r) | |
1da177e4 LT |
9 | #if defined(__LITTLE_ENDIAN__) |
10 | jiffies = jiffies_64; | |
11 | #else | |
12 | jiffies = jiffies_64 + 4; | |
13 | #endif | |
3d60f849 HT |
14 | |
15 | kernel_entry = boot - 0x80000000; | |
16 | ENTRY(kernel_entry) | |
17 | ||
1da177e4 LT |
18 | SECTIONS |
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 : { | |
30 | *(.text) | |
31 | 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) | |
53 | *(.data) | |
54 | CONSTRUCTORS | |
55 | } | |
56 | ||
57 | . = ALIGN(4096); | |
58 | __nosave_begin = .; | |
59 | .data_nosave : { *(.data.nosave) } | |
60 | . = ALIGN(4096); | |
61 | __nosave_end = .; | |
62 | ||
63 | . = ALIGN(4096); | |
64 | .data.page_aligned : { *(.data.idt) } | |
65 | ||
66 | . = ALIGN(32); | |
67 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } | |
68 | ||
69 | _edata = .; /* End of data section */ | |
70 | ||
71 | . = ALIGN(8192); /* init_task */ | |
72 | .data.init_task : { *(.data.init_task) } | |
73 | ||
74 | /* will be freed after init */ | |
75 | . = ALIGN(4096); /* Init code and data */ | |
76 | __init_begin = .; | |
77 | .init.text : { | |
78 | _sinittext = .; | |
79 | *(.init.text) | |
80 | _einittext = .; | |
81 | } | |
82 | .init.data : { *(.init.data) } | |
83 | . = ALIGN(16); | |
84 | __setup_start = .; | |
85 | .init.setup : { *(.init.setup) } | |
86 | __setup_end = .; | |
87 | __initcall_start = .; | |
88 | .initcall.init : { | |
61ce1efe | 89 | INITCALLS |
1da177e4 LT |
90 | } |
91 | __initcall_end = .; | |
92 | __con_initcall_start = .; | |
93 | .con_initcall.init : { *(.con_initcall.init) } | |
94 | __con_initcall_end = .; | |
95 | SECURITY_INIT | |
96 | . = ALIGN(4); | |
97 | __alt_instructions = .; | |
98 | .altinstructions : { *(.altinstructions) } | |
99 | __alt_instructions_end = .; | |
100 | .altinstr_replacement : { *(.altinstr_replacement) } | |
101 | /* .exit.text is discard at runtime, not link time, to deal with references | |
102 | from .altinstructions and .eh_frame */ | |
103 | .exit.text : { *(.exit.text) } | |
104 | .exit.data : { *(.exit.data) } | |
105 | . = ALIGN(4096); | |
106 | __initramfs_start = .; | |
107 | .init.ramfs : { *(.init.ramfs) } | |
108 | __initramfs_end = .; | |
109 | . = ALIGN(32); | |
110 | __per_cpu_start = .; | |
111 | .data.percpu : { *(.data.percpu) } | |
112 | __per_cpu_end = .; | |
113 | . = ALIGN(4096); | |
114 | __init_end = .; | |
115 | /* freed after init ends here */ | |
116 | ||
117 | __bss_start = .; /* BSS */ | |
118 | .bss : { *(.bss) } | |
119 | . = ALIGN(4); | |
120 | __bss_stop = .; | |
121 | ||
122 | _end = . ; | |
123 | ||
124 | /* Sections to be discarded */ | |
125 | /DISCARD/ : { | |
126 | *(.exit.text) | |
127 | *(.exit.data) | |
128 | *(.exitcall.exit) | |
129 | } | |
130 | ||
131 | /* Stabs debugging sections. */ | |
132 | .stab 0 : { *(.stab) } | |
133 | .stabstr 0 : { *(.stabstr) } | |
134 | .stab.excl 0 : { *(.stab.excl) } | |
135 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
136 | .stab.index 0 : { *(.stab.index) } | |
137 | .stab.indexstr 0 : { *(.stab.indexstr) } | |
138 | .comment 0 : { *(.comment) } | |
139 | } |