Merge branch 'master' of ssh://rsync.linux-nfs.org/home/trondmy/www_sites/rsync.linux...
[linux-2.6] / arch / arm / kernel / vmlinux.lds.S
1 /* ld script to make ARM Linux kernel
2  * taken from the i386 version by Russell King
3  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
4  */
5
6 #include <asm-generic/vmlinux.lds.h>
7 #include <linux/config.h>
8 #include <asm/thread_info.h>
9         
10 OUTPUT_ARCH(arm)
11 ENTRY(stext)
12 #ifndef __ARMEB__
13 jiffies = jiffies_64;
14 #else
15 jiffies = jiffies_64 + 4;
16 #endif
17 SECTIONS
18 {
19         . = TEXTADDR;
20         .init : {                       /* Init code and data           */
21                 _stext = .;
22                         _sinittext = .;
23                         *(.init.text)
24                         _einittext = .;
25                 __proc_info_begin = .;
26                         *(.proc.info.init)
27                 __proc_info_end = .;
28                 __arch_info_begin = .;
29                         *(.arch.info.init)
30                 __arch_info_end = .;
31                 __tagtable_begin = .;
32                         *(.taglist.init)
33                 __tagtable_end = .;
34                 . = ALIGN(16);
35                 __setup_start = .;
36                         *(.init.setup)
37                 __setup_end = .;
38                 __early_begin = .;
39                         *(.early_param.init)
40                 __early_end = .;
41                 __initcall_start = .;
42                         *(.initcall1.init)
43                         *(.initcall2.init)
44                         *(.initcall3.init)
45                         *(.initcall4.init)
46                         *(.initcall5.init)
47                         *(.initcall6.init)
48                         *(.initcall7.init)
49                 __initcall_end = .;
50                 __con_initcall_start = .;
51                         *(.con_initcall.init)
52                 __con_initcall_end = .;
53                 __security_initcall_start = .;
54                         *(.security_initcall.init)
55                 __security_initcall_end = .;
56                 . = ALIGN(32);
57                 __initramfs_start = .;
58                         usr/built-in.o(.init.ramfs)
59                 __initramfs_end = .;
60                 . = ALIGN(64);
61                 __per_cpu_start = .;
62                         *(.data.percpu)
63                 __per_cpu_end = .;
64 #ifndef CONFIG_XIP_KERNEL
65                 __init_begin = _stext;
66                 *(.init.data)
67                 . = ALIGN(4096);
68                 __init_end = .;
69 #endif
70         }
71
72         /DISCARD/ : {                   /* Exit code and data           */
73                 *(.exit.text)
74                 *(.exit.data)
75                 *(.exitcall.exit)
76         }
77
78         .text : {                       /* Real text segment            */
79                 _text = .;              /* Text and read-only data      */
80                         *(.text)
81                         SCHED_TEXT
82                         LOCK_TEXT
83                         *(.fixup)
84                         *(.gnu.warning)
85                         *(.rodata)
86                         *(.rodata.*)
87                         *(.glue_7)
88                         *(.glue_7t)
89                 *(.got)                 /* Global offset table          */
90         }
91
92         RODATA
93
94         _etext = .;                     /* End of text and rodata section */
95
96 #ifdef CONFIG_XIP_KERNEL
97         __data_loc = ALIGN(4);          /* location in binary */
98         . = DATAADDR;
99 #else
100         . = ALIGN(THREAD_SIZE);
101         __data_loc = .;
102 #endif
103
104         .data : AT(__data_loc) {
105                 __data_start = .;       /* address in memory */
106
107                 /*
108                  * first, the init task union, aligned
109                  * to an 8192 byte boundary.
110                  */
111                 *(.init.task)
112
113 #ifdef CONFIG_XIP_KERNEL
114                 . = ALIGN(4096);
115                 __init_begin = .;
116                 *(.init.data)
117                 . = ALIGN(4096);
118                 __init_end = .;
119 #endif
120
121                 . = ALIGN(4096);
122                 __nosave_begin = .;
123                 *(.data.nosave)
124                 . = ALIGN(4096);
125                 __nosave_end = .;
126
127                 /*
128                  * then the cacheline aligned data
129                  */
130                 . = ALIGN(32);
131                 *(.data.cacheline_aligned)
132
133                 /*
134                  * The exception fixup table (might need resorting at runtime)
135                  */
136                 . = ALIGN(32);
137                 __start___ex_table = .;
138                 *(__ex_table)
139                 __stop___ex_table = .;
140
141                 /*
142                  * and the usual data section
143                  */
144                 *(.data)
145                 CONSTRUCTORS
146
147                 _edata = .;
148         }
149
150         .bss : {
151                 __bss_start = .;        /* BSS                          */
152                 *(.bss)
153                 *(COMMON)
154                 _end = .;
155         }
156                                         /* Stabs debugging sections.    */
157         .stab 0 : { *(.stab) }
158         .stabstr 0 : { *(.stabstr) }
159         .stab.excl 0 : { *(.stab.excl) }
160         .stab.exclstr 0 : { *(.stab.exclstr) }
161         .stab.index 0 : { *(.stab.index) }
162         .stab.indexstr 0 : { *(.stab.indexstr) }
163         .comment 0 : { *(.comment) }
164 }
165
166 /* those must never be empty */
167 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
168 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")