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