blob: 9c1fb12367fa3cfbedf6b8abe926fc40eb0e431e [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 : {
Andrew Morton61ce1ef2006-10-27 11:41:44 -070047 INITCALLS
Linus Torvalds1da177e2005-04-16 15:20:36 -070048 }
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
60 __per_cpu_start = .;
61 .data.percpu : { *(.data.percpu) }
62 __per_cpu_end = .;
63
64 . = ALIGN(4096);
65 __initramfs_start = .;
66 .init.ramfs : { *(.init.ramfs) }
67 __initramfs_end = .;
68
69 . = ALIGN(THREAD_SIZE);
70 __init_end = .;
71
72 /* put sections together that have massive alignment issues */
73 . = ALIGN(THREAD_SIZE);
74 .data.init_task : {
75 /* init task record & stack */
76 *(.data.init_task)
77 }
78
79 .trap : {
80 /* trap table management - read entry-table.S before modifying */
81 . = ALIGN(8192);
82 __trap_tables = .;
83 *(.trap.user)
84 *(.trap.kernel)
85 . = ALIGN(4096);
86 *(.trap.break)
87 }
88
89 . = ALIGN(4096);
90 .data.page_aligned : { *(.data.idt) }
91
92 . = ALIGN(L1_CACHE_BYTES);
93 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
94
95 /* Text and read-only data */
96 . = ALIGN(4);
97 _text = .;
98 _stext = .;
99 .text : {
100 *(
101 .text.start .text .text.*
102#ifdef CONFIG_DEBUG_INFO
103 .init.text
104 .exit.text
105 .exitcall.exit
106#endif
107 )
108 SCHED_TEXT
David Howells41be6ae2006-01-08 01:01:25 -0800109 LOCK_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -0700110 *(.fixup)
111 *(.gnu.warning)
112 *(.exitcall.exit)
113 } = 0x9090
114
115 _etext = .; /* End of text section */
116
117 RODATA
118
119 .rodata : {
120 *(.trap.vector)
121
122 /* this clause must not be modified - the ordering and adjacency are imperative */
123 __trap_fixup_tables = .;
124 *(.trap.fixup.user .trap.fixup.kernel)
125
126 }
127
128 . = ALIGN(8); /* Exception table */
129 __start___ex_table = .;
130 __ex_table : { KEEP(*(__ex_table)) }
131 __stop___ex_table = .;
132
133 _sdata = .;
134 .data : { /* Data */
135 *(.data .data.*)
136 *(.exit.data)
137 CONSTRUCTORS
138 }
139
140 _edata = .; /* End of data section */
141
142 /* GP section */
143 . = ALIGN(L1_CACHE_BYTES);
144 _gp = . + 2048;
145 PROVIDE (gp = _gp);
146
147 .sdata : { *(.sdata .sdata.*) }
148
149 /* BSS */
150 . = ALIGN(L1_CACHE_BYTES);
151 __bss_start = .;
152
153 .sbss : { *(.sbss .sbss.*) }
154 .bss : { *(.bss .bss.*) }
155 .bss.stack : { *(.bss) }
156
157 __bss_stop = .;
158 _end = . ;
159 . = ALIGN(PAGE_SIZE);
160 __kernel_image_end = .;
161
162 /* Stabs debugging sections. */
163 .stab 0 : { *(.stab) }
164 .stabstr 0 : { *(.stabstr) }
165 .stab.excl 0 : { *(.stab.excl) }
166 .stab.exclstr 0 : { *(.stab.exclstr) }
167 .stab.index 0 : { *(.stab.index) }
168 .stab.indexstr 0 : { *(.stab.indexstr) }
169
170 .debug_line 0 : { *(.debug_line) }
171 .debug_info 0 : { *(.debug_info) }
172 .debug_abbrev 0 : { *(.debug_abbrev) }
173 .debug_aranges 0 : { *(.debug_aranges) }
174 .debug_frame 0 : { *(.debug_frame) }
175 .debug_pubnames 0 : { *(.debug_pubnames) }
176 .debug_str 0 : { *(.debug_str) }
177 .debug_ranges 0 : { *(.debug_ranges) }
178
179 .comment 0 : { *(.comment) }
180}
181
182__kernel_image_size_no_bss = __bss_start - __kernel_image_start;