Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* ld script to make FRV Linux kernel |
2 | * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>; | |
3 | */ | |
4 | OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv") | |
5 | OUTPUT_ARCH(frv) | |
6 | ENTRY(_start) | |
7 | ||
8 | #include <asm-generic/vmlinux.lds.h> | |
9 | #include <asm/processor.h> | |
10 | #include <asm/page.h> | |
11 | #include <asm/cache.h> | |
12 | #include <asm/thread_info.h> | |
13 | ||
14 | jiffies = jiffies_64 + 4; | |
15 | ||
16 | __page_offset = 0xc0000000; /* start of area covered by struct pages */ | |
17 | __kernel_image_start = __page_offset; /* address at which kernel image resides */ | |
18 | ||
19 | SECTIONS | |
20 | { | |
21 | . = __kernel_image_start; | |
22 | ||
23 | /* discardable initialisation code and data */ | |
24 | . = ALIGN(PAGE_SIZE); /* Init code and data */ | |
25 | __init_begin = .; | |
26 | ||
27 | _sinittext = .; | |
28 | .init.text : { | |
29 | *(.text.head) | |
30 | #ifndef CONFIG_DEBUG_INFO | |
31 | *(.init.text) | |
32 | *(.exit.text) | |
33 | *(.exit.data) | |
34 | *(.exitcall.exit) | |
35 | #endif | |
36 | } | |
37 | _einittext = .; | |
38 | .init.data : { *(.init.data) } | |
39 | ||
40 | . = ALIGN(8); | |
41 | __setup_start = .; | |
42 | .setup.init : { KEEP(*(.init.setup)) } | |
43 | __setup_end = .; | |
44 | ||
45 | __initcall_start = .; | |
46 | .initcall.init : { | |
61ce1efe | 47 | INITCALLS |
1da177e4 LT |
48 | } |
49 | __initcall_end = .; | |
50 | __con_initcall_start = .; | |
51 | .con_initcall.init : { *(.con_initcall.init) } | |
52 | __con_initcall_end = .; | |
53 | SECURITY_INIT | |
54 | . = ALIGN(4); | |
55 | __alt_instructions = .; | |
56 | .altinstructions : { *(.altinstructions) } | |
57 | __alt_instructions_end = .; | |
58 | .altinstr_replacement : { *(.altinstr_replacement) } | |
59 | ||
b6e3590f | 60 | . = ALIGN(4096); |
1da177e4 LT |
61 | __per_cpu_start = .; |
62 | .data.percpu : { *(.data.percpu) } | |
63 | __per_cpu_end = .; | |
64 | ||
67d38229 | 65 | #ifdef CONFIG_BLK_DEV_INITRD |
1da177e4 LT |
66 | . = ALIGN(4096); |
67 | __initramfs_start = .; | |
68 | .init.ramfs : { *(.init.ramfs) } | |
69 | __initramfs_end = .; | |
67d38229 | 70 | #endif |
1da177e4 LT |
71 | |
72 | . = ALIGN(THREAD_SIZE); | |
73 | __init_end = .; | |
74 | ||
75 | /* put sections together that have massive alignment issues */ | |
76 | . = ALIGN(THREAD_SIZE); | |
77 | .data.init_task : { | |
78 | /* init task record & stack */ | |
79 | *(.data.init_task) | |
80 | } | |
81 | ||
82 | .trap : { | |
83 | /* trap table management - read entry-table.S before modifying */ | |
84 | . = ALIGN(8192); | |
85 | __trap_tables = .; | |
86 | *(.trap.user) | |
87 | *(.trap.kernel) | |
88 | . = ALIGN(4096); | |
89 | *(.trap.break) | |
90 | } | |
91 | ||
92 | . = ALIGN(4096); | |
93 | .data.page_aligned : { *(.data.idt) } | |
94 | ||
95 | . = ALIGN(L1_CACHE_BYTES); | |
96 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } | |
97 | ||
98 | /* Text and read-only data */ | |
99 | . = ALIGN(4); | |
100 | _text = .; | |
101 | _stext = .; | |
102 | .text : { | |
103 | *( | |
104 | .text.start .text .text.* | |
105 | #ifdef CONFIG_DEBUG_INFO | |
106 | .init.text | |
107 | .exit.text | |
108 | .exitcall.exit | |
109 | #endif | |
110 | ) | |
111 | SCHED_TEXT | |
41be6aef | 112 | LOCK_TEXT |
1da177e4 LT |
113 | *(.fixup) |
114 | *(.gnu.warning) | |
115 | *(.exitcall.exit) | |
116 | } = 0x9090 | |
117 | ||
118 | _etext = .; /* End of text section */ | |
119 | ||
120 | RODATA | |
121 | ||
122 | .rodata : { | |
123 | *(.trap.vector) | |
124 | ||
125 | /* this clause must not be modified - the ordering and adjacency are imperative */ | |
126 | __trap_fixup_tables = .; | |
127 | *(.trap.fixup.user .trap.fixup.kernel) | |
128 | ||
129 | } | |
130 | ||
131 | . = ALIGN(8); /* Exception table */ | |
132 | __start___ex_table = .; | |
133 | __ex_table : { KEEP(*(__ex_table)) } | |
134 | __stop___ex_table = .; | |
135 | ||
136 | _sdata = .; | |
137 | .data : { /* Data */ | |
138 | *(.data .data.*) | |
139 | *(.exit.data) | |
140 | CONSTRUCTORS | |
141 | } | |
142 | ||
143 | _edata = .; /* End of data section */ | |
144 | ||
145 | /* GP section */ | |
146 | . = ALIGN(L1_CACHE_BYTES); | |
147 | _gp = . + 2048; | |
148 | PROVIDE (gp = _gp); | |
149 | ||
150 | .sdata : { *(.sdata .sdata.*) } | |
151 | ||
152 | /* BSS */ | |
153 | . = ALIGN(L1_CACHE_BYTES); | |
154 | __bss_start = .; | |
155 | ||
156 | .sbss : { *(.sbss .sbss.*) } | |
157 | .bss : { *(.bss .bss.*) } | |
158 | .bss.stack : { *(.bss) } | |
159 | ||
160 | __bss_stop = .; | |
161 | _end = . ; | |
162 | . = ALIGN(PAGE_SIZE); | |
163 | __kernel_image_end = .; | |
164 | ||
165 | /* Stabs debugging sections. */ | |
166 | .stab 0 : { *(.stab) } | |
167 | .stabstr 0 : { *(.stabstr) } | |
168 | .stab.excl 0 : { *(.stab.excl) } | |
169 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
170 | .stab.index 0 : { *(.stab.index) } | |
171 | .stab.indexstr 0 : { *(.stab.indexstr) } | |
172 | ||
173 | .debug_line 0 : { *(.debug_line) } | |
174 | .debug_info 0 : { *(.debug_info) } | |
175 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
176 | .debug_aranges 0 : { *(.debug_aranges) } | |
177 | .debug_frame 0 : { *(.debug_frame) } | |
178 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
179 | .debug_str 0 : { *(.debug_str) } | |
180 | .debug_ranges 0 : { *(.debug_ranges) } | |
181 | ||
182 | .comment 0 : { *(.comment) } | |
183 | } | |
184 | ||
185 | __kernel_image_size_no_bss = __bss_start - __kernel_image_start; |