GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / kernel / vmlinux.lds.S
blob8184c83101c83392765d3be7ec30dafafaa75cd8
1 /* Modified by Broadcom Corp. Portions Copyright (c) Broadcom Corp, 2012. */
2 /* ld script to make ARM Linux kernel
3  * taken from the i386 version by Russell King
4  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
5  */
7 #include <asm-generic/vmlinux.lds.h>
8 #include <asm/thread_info.h>
9 #include <asm/memory.h>
10 #include <asm/page.h>
11         
12 OUTPUT_ARCH(arm)
13 ENTRY(stext)
15 #ifndef __ARMEB__
16 jiffies = jiffies_64;
17 #else
18 jiffies = jiffies_64 + 4;
19 #endif
21 SECTIONS
23 #ifdef CONFIG_XIP_KERNEL
24         . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
25 #else
26         . = PAGE_OFFSET + TEXT_OFFSET;
27 #endif
29         .init : {                       /* Init code and data           */
30                 _stext = .;
31                 _sinittext = .;
32                         HEAD_TEXT
33                         INIT_TEXT
34                 _einittext = .;
35                 __proc_info_begin = .;
36                         *(.proc.info.init)
37                 __proc_info_end = .;
38                 __arch_info_begin = .;
39                         *(.arch.info.init)
40                 __arch_info_end = .;
41                 __tagtable_begin = .;
42                         *(.taglist.init)
43                 __tagtable_end = .;
45                 INIT_SETUP(16)
47                 INIT_CALLS
48                 CON_INITCALL
49                 SECURITY_INITCALL
50                 INIT_RAM_FS
52 #ifndef CONFIG_XIP_KERNEL
53                 __init_begin = _stext;
54                 INIT_DATA
55 #endif
56         }
58         PERCPU(PAGE_SIZE)
60 #ifndef CONFIG_XIP_KERNEL
61         . = ALIGN(PAGE_SIZE);
62         __init_end = .;
63 #endif
65         /*
66          * unwind exit sections must be discarded before the rest of the
67          * unwind sections get included.
68          */
69         /DISCARD/ : {
70                 *(.ARM.exidx.exit.text)
71                 *(.ARM.extab.exit.text)
72 #ifndef CONFIG_HOTPLUG_CPU
73                 *(.ARM.exidx.cpuexit.text)
74                 *(.ARM.extab.cpuexit.text)
75 #endif
76 #ifndef CONFIG_HOTPLUG
77                 *(.ARM.exidx.devexit.text)
78                 *(.ARM.extab.devexit.text)
79 #endif
80 #ifndef CONFIG_MMU
81                 *(.fixup)
82                 *(__ex_table)
83 #endif
84         }
86         .text : {                       /* Real text segment            */
87                 _text = .;              /* Text and read-only data      */
88                         __exception_text_start = .;
89                         *(.exception.text)
90                         __exception_text_end = .;
91                         TEXT_TEXT
92                         SCHED_TEXT
93                         LOCK_TEXT
94                         KPROBES_TEXT
95 #ifdef CONFIG_MMU
96                         *(.fixup)
97 #endif
98                         *(.gnu.warning)
99                         *(.rodata)
100                         *(.rodata.*)
101                         *(.glue_7)
102                         *(.glue_7t)
103                 *(.got)                 /* Global offset table          */
104         }
106         . = ALIGN(32);
107         __fastpath_begin = .;
108         .text.fastpath : { *(.text.fastpath) }
109         __fastpath_end = .;
111         RO_DATA(PAGE_SIZE)
113         _etext = .;                     /* End of text and rodata section */
115 #ifdef CONFIG_ARM_UNWIND
116         /*
117          * Stack unwinding tables
118          */
119         . = ALIGN(8);
120         .ARM.unwind_idx : {
121                 __start_unwind_idx = .;
122                 *(.ARM.exidx*)
123                 __stop_unwind_idx = .;
124         }
125         .ARM.unwind_tab : {
126                 __start_unwind_tab = .;
127                 *(.ARM.extab*)
128                 __stop_unwind_tab = .;
129         }
130 #endif
132 #ifdef CONFIG_XIP_KERNEL
133         __data_loc = ALIGN(4);          /* location in binary */
134         . = PAGE_OFFSET + TEXT_OFFSET;
135 #else
136         . = ALIGN(THREAD_SIZE);
137         __data_loc = .;
138 #endif
140         .data : AT(__data_loc) {
141                 _data = .;              /* address in memory */
142                 _sdata = .;
144                 /*
145                  * first, the init task union, aligned
146                  * to an 8192 byte boundary.
147                  */
148                 INIT_TASK_DATA(THREAD_SIZE)
150 #ifdef CONFIG_XIP_KERNEL
151                 . = ALIGN(PAGE_SIZE);
152                 __init_begin = .;
153                 INIT_DATA
154                 . = ALIGN(PAGE_SIZE);
155                 __init_end = .;
156 #endif
158                 NOSAVE_DATA
159                 CACHELINE_ALIGNED_DATA(32)
161                 /*
162                  * The exception fixup table (might need resorting at runtime)
163                  */
164                 . = ALIGN(32);
165                 __start___ex_table = .;
166 #ifdef CONFIG_MMU
167                 *(__ex_table)
168 #endif
169                 __stop___ex_table = .;
171                 /*
172                  * and the usual data section
173                  */
174                 DATA_DATA
175                 CONSTRUCTORS
177                 _edata = .;
178         }
179         _edata_loc = __data_loc + SIZEOF(.data);
181 #ifdef CONFIG_HAVE_TCM
182         /*
183          * We align everything to a page boundary so we can
184          * free it after init has commenced and TCM contents have
185          * been copied to its destination.
186          */
187         .tcm_start : {
188                 . = ALIGN(PAGE_SIZE);
189                 __tcm_start = .;
190                 __itcm_start = .;
191         }
193         /*
194          * Link these to the ITCM RAM
195          * Put VMA to the TCM address and LMA to the common RAM
196          * and we'll upload the contents from RAM to TCM and free
197          * the used RAM after that.
198          */
199         .text_itcm ITCM_OFFSET : AT(__itcm_start)
200         {
201                 __sitcm_text = .;
202                 *(.tcm.text)
203                 *(.tcm.rodata)
204                 . = ALIGN(4);
205                 __eitcm_text = .;
206         }
208         /*
209          * Reset the dot pointer, this is needed to create the
210          * relative __dtcm_start below (to be used as extern in code).
211          */
212         . = ADDR(.tcm_start) + SIZEOF(.tcm_start) + SIZEOF(.text_itcm);
214         .dtcm_start : {
215                 __dtcm_start = .;
216         }
218         /* TODO: add remainder of ITCM as well, that can be used for data! */
219         .data_dtcm DTCM_OFFSET : AT(__dtcm_start)
220         {
221                 . = ALIGN(4);
222                 __sdtcm_data = .;
223                 *(.tcm.data)
224                 . = ALIGN(4);
225                 __edtcm_data = .;
226         }
228         /* Reset the dot pointer or the linker gets confused */
229         . = ADDR(.dtcm_start) + SIZEOF(.data_dtcm);
231         /* End marker for freeing TCM copy in linked object */
232         .tcm_end : AT(ADDR(.dtcm_start) + SIZEOF(.data_dtcm)){
233                 . = ALIGN(PAGE_SIZE);
234                 __tcm_end = .;
235         }
236 #endif
238         BSS_SECTION(0, 0, 0)
239         _end = .;
241         STABS_DEBUG
242         .comment 0 : { *(.comment) }
244         /* Default discards */
245         DISCARDS
249  * These must never be empty
250  * If you have to comment these two assert statements out, your
251  * binutils is too old (for other reasons as well)
252  */
253 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
254 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")