Merge branches 'release', 'asus', 'sony-laptop' and 'thinkpad' into release
[pandora-kernel.git] / arch / frv / kernel / vmlinux.lds.S
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 = CONFIG_PAGE_OFFSET;     /* 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 : {
47         INITCALLS
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
60   PERCPU(4096)
61
62 #ifdef CONFIG_BLK_DEV_INITRD
63   . = ALIGN(4096);
64   __initramfs_start = .;
65   .init.ramfs : { *(.init.ramfs) }
66   __initramfs_end = .;
67 #endif
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   . = ALIGN(4096);
80   .data.page_aligned : { *(.data.idt) }
81
82   . = ALIGN(L1_CACHE_BYTES);
83   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
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   /* Text and read-only data */
96   . = ALIGN(4);
97   _text = .;
98   _stext = .;
99   .text : {
100         *(.text.start)
101         *(.text.entry)
102         *(.text.break)
103         *(.text.tlbmiss)
104         TEXT_TEXT
105         SCHED_TEXT
106         LOCK_TEXT
107 #ifdef CONFIG_DEBUG_INFO
108         *(
109         INIT_TEXT
110         EXIT_TEXT
111         .exitcall.exit
112         )
113 #endif
114         *(.fixup)
115         *(.gnu.warning)
116         *(.exitcall.exit)
117         } = 0x9090
118
119   _etext = .;                   /* End of text section */
120
121   RODATA
122
123   .rodata : {
124         *(.trap.vector)
125
126         /* this clause must not be modified - the ordering and adjacency are imperative */
127         __trap_fixup_tables = .;
128         *(.trap.fixup.user .trap.fixup.kernel)
129
130         }
131
132   . = ALIGN(8);         /* Exception table */
133   __start___ex_table = .;
134   __ex_table : { KEEP(*(__ex_table)) }
135   __stop___ex_table = .;
136
137   _sdata = .;
138   .data : {                     /* Data */
139         DATA_DATA
140         *(.data.*)
141         EXIT_DATA
142         CONSTRUCTORS
143         }
144
145   _edata = .;                   /* End of data section */
146
147   /* GP section */
148   . = ALIGN(L1_CACHE_BYTES);
149   _gp = . + 2048;
150   PROVIDE (gp = _gp);
151
152   .sdata : { *(.sdata .sdata.*) }
153
154   /* BSS */
155   . = ALIGN(L1_CACHE_BYTES);
156   __bss_start = .;
157
158   .sbss         : { *(.sbss .sbss.*) }
159   .bss          : { *(.bss .bss.*) }
160   .bss.stack    : { *(.bss) }
161
162   __bss_stop = .;
163   _end = . ;
164   . = ALIGN(PAGE_SIZE);
165   __kernel_image_end = .;
166
167   /* Stabs debugging sections.  */
168   .stab 0 : { *(.stab) }
169   .stabstr 0 : { *(.stabstr) }
170   .stab.excl 0 : { *(.stab.excl) }
171   .stab.exclstr 0 : { *(.stab.exclstr) }
172   .stab.index 0 : { *(.stab.index) }
173   .stab.indexstr 0 : { *(.stab.indexstr) }
174
175   .debug_line           0 : { *(.debug_line) }
176   .debug_info           0 : { *(.debug_info) }
177   .debug_abbrev         0 : { *(.debug_abbrev) }
178   .debug_aranges        0 : { *(.debug_aranges) }
179   .debug_frame          0 : { *(.debug_frame) }
180   .debug_pubnames       0 : { *(.debug_pubnames) }
181   .debug_str            0 : { *(.debug_str) }
182   .debug_ranges         0 : { *(.debug_ranges) }
183
184   .comment 0 : { *(.comment) }
185 }
186
187 __kernel_image_size_no_bss = __bss_start - __kernel_image_start;