blob: f474534ba78a50ff61b7c60b31fa37121ba3de1a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* ld script to make FRV Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
3 */
4OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv")
5OUTPUT_ARCH(frv)
6ENTRY(_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
14jiffies = 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
19SECTIONS
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 : {
47 *(.initcall1.init)
48 *(.initcall2.init)
49 *(.initcall3.init)
50 *(.initcall4.init)
51 *(.initcall5.init)
52 *(.initcall6.init)
53 *(.initcall7.init)
54 }
55 __initcall_end = .;
56 __con_initcall_start = .;
57 .con_initcall.init : { *(.con_initcall.init) }
58 __con_initcall_end = .;
59 SECURITY_INIT
60 . = ALIGN(4);
61 __alt_instructions = .;
62 .altinstructions : { *(.altinstructions) }
63 __alt_instructions_end = .;
64 .altinstr_replacement : { *(.altinstr_replacement) }
65
66 __per_cpu_start = .;
67 .data.percpu : { *(.data.percpu) }
68 __per_cpu_end = .;
69
70 . = ALIGN(4096);
71 __initramfs_start = .;
72 .init.ramfs : { *(.init.ramfs) }
73 __initramfs_end = .;
74
75 . = ALIGN(THREAD_SIZE);
76 __init_end = .;
77
78 /* put sections together that have massive alignment issues */
79 . = ALIGN(THREAD_SIZE);
80 .data.init_task : {
81 /* init task record & stack */
82 *(.data.init_task)
83 }
84
85 .trap : {
86 /* trap table management - read entry-table.S before modifying */
87 . = ALIGN(8192);
88 __trap_tables = .;
89 *(.trap.user)
90 *(.trap.kernel)
91 . = ALIGN(4096);
92 *(.trap.break)
93 }
94
95 . = ALIGN(4096);
96 .data.page_aligned : { *(.data.idt) }
97
98 . = ALIGN(L1_CACHE_BYTES);
99 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
100
101 /* Text and read-only data */
102 . = ALIGN(4);
103 _text = .;
104 _stext = .;
105 .text : {
106 *(
107 .text.start .text .text.*
108#ifdef CONFIG_DEBUG_INFO
109 .init.text
110 .exit.text
111 .exitcall.exit
112#endif
113 )
114 SCHED_TEXT
David Howells41be6ae2006-01-08 01:01:25 -0800115 LOCK_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116 *(.fixup)
117 *(.gnu.warning)
118 *(.exitcall.exit)
119 } = 0x9090
120
121 _etext = .; /* End of text section */
122
123 RODATA
124
125 .rodata : {
126 *(.trap.vector)
127
128 /* this clause must not be modified - the ordering and adjacency are imperative */
129 __trap_fixup_tables = .;
130 *(.trap.fixup.user .trap.fixup.kernel)
131
132 }
133
134 . = ALIGN(8); /* Exception table */
135 __start___ex_table = .;
136 __ex_table : { KEEP(*(__ex_table)) }
137 __stop___ex_table = .;
138
139 _sdata = .;
140 .data : { /* Data */
141 *(.data .data.*)
142 *(.exit.data)
143 CONSTRUCTORS
144 }
145
146 _edata = .; /* End of data section */
147
148 /* GP section */
149 . = ALIGN(L1_CACHE_BYTES);
150 _gp = . + 2048;
151 PROVIDE (gp = _gp);
152
153 .sdata : { *(.sdata .sdata.*) }
154
155 /* BSS */
156 . = ALIGN(L1_CACHE_BYTES);
157 __bss_start = .;
158
159 .sbss : { *(.sbss .sbss.*) }
160 .bss : { *(.bss .bss.*) }
161 .bss.stack : { *(.bss) }
162
163 __bss_stop = .;
164 _end = . ;
165 . = ALIGN(PAGE_SIZE);
166 __kernel_image_end = .;
167
168 /* Stabs debugging sections. */
169 .stab 0 : { *(.stab) }
170 .stabstr 0 : { *(.stabstr) }
171 .stab.excl 0 : { *(.stab.excl) }
172 .stab.exclstr 0 : { *(.stab.exclstr) }
173 .stab.index 0 : { *(.stab.index) }
174 .stab.indexstr 0 : { *(.stab.indexstr) }
175
176 .debug_line 0 : { *(.debug_line) }
177 .debug_info 0 : { *(.debug_info) }
178 .debug_abbrev 0 : { *(.debug_abbrev) }
179 .debug_aranges 0 : { *(.debug_aranges) }
180 .debug_frame 0 : { *(.debug_frame) }
181 .debug_pubnames 0 : { *(.debug_pubnames) }
182 .debug_str 0 : { *(.debug_str) }
183 .debug_ranges 0 : { *(.debug_ranges) }
184
185 .comment 0 : { *(.comment) }
186}
187
188__kernel_image_size_no_bss = __bss_start - __kernel_image_start;