blob: d656b462402431f0b7e4d94a5270883812a40f61 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef LOAD_OFFSET
2#define LOAD_OFFSET 0
3#endif
4
5#ifndef VMLINUX_SYMBOL
6#define VMLINUX_SYMBOL(_sym_) _sym_
7#endif
8
Sam Ravnborg6d30e3a2005-07-14 20:15:44 +00009/* Align . to a 8 byte boundary equals to maximum function alignment. */
10#define ALIGN_FUNCTION() . = ALIGN(8)
11
Sam Ravnborgeb8f6892008-01-20 20:07:28 +010012/* The actual configuration determine if the init/exit sections
13 * are handled as text/data or they can be discarded (which
14 * often happens at runtime)
15 */
16#ifdef CONFIG_HOTPLUG
17#define DEV_KEEP(sec) *(.dev##sec)
18#define DEV_DISCARD(sec)
19#else
20#define DEV_KEEP(sec)
21#define DEV_DISCARD(sec) *(.dev##sec)
22#endif
23
24#ifdef CONFIG_HOTPLUG_CPU
25#define CPU_KEEP(sec) *(.cpu##sec)
26#define CPU_DISCARD(sec)
27#else
28#define CPU_KEEP(sec)
29#define CPU_DISCARD(sec) *(.cpu##sec)
30#endif
31
Adrian Bunk1a3fb6d2008-01-24 22:20:18 +010032#if defined(CONFIG_MEMORY_HOTPLUG)
Sam Ravnborgeb8f6892008-01-20 20:07:28 +010033#define MEM_KEEP(sec) *(.mem##sec)
34#define MEM_DISCARD(sec)
35#else
36#define MEM_KEEP(sec)
37#define MEM_DISCARD(sec) *(.mem##sec)
38#endif
39
Steven Rostedt8da38212008-08-14 15:45:07 -040040#ifdef CONFIG_FTRACE_MCOUNT_RECORD
41#define MCOUNT_REC() VMLINUX_SYMBOL(__start_mcount_loc) = .; \
42 *(__mcount_loc) \
43 VMLINUX_SYMBOL(__stop_mcount_loc) = .;
44#else
45#define MCOUNT_REC()
46#endif
Sam Ravnborgeb8f6892008-01-20 20:07:28 +010047
Steven Rostedt2ed84ee2008-11-12 15:24:24 -050048#ifdef CONFIG_TRACE_BRANCH_PROFILING
Steven Rostedt45b79742008-11-21 00:40:40 -050049#define LIKELY_PROFILE() VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \
50 *(_ftrace_annotated_branch) \
51 VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .;
Steven Rostedt1f0d69a2008-11-12 00:14:39 -050052#else
53#define LIKELY_PROFILE()
54#endif
55
Steven Rostedt2bcd5212008-11-21 01:30:54 -050056#ifdef CONFIG_PROFILE_ALL_BRANCHES
57#define BRANCH_PROFILE() VMLINUX_SYMBOL(__start_branch_profile) = .; \
58 *(_ftrace_branch) \
59 VMLINUX_SYMBOL(__stop_branch_profile) = .;
60#else
61#define BRANCH_PROFILE()
62#endif
63
Steven Rostedtb77e38a2009-02-24 10:21:36 -050064#ifdef CONFIG_EVENT_TRACER
65#define FTRACE_EVENTS() VMLINUX_SYMBOL(__start_ftrace_events) = .; \
66 *(_ftrace_events) \
67 VMLINUX_SYMBOL(__stop_ftrace_events) = .;
68#else
69#define FTRACE_EVENTS()
70#endif
71
Lai Jiangshan1ba28e02009-03-06 17:21:48 +010072#ifdef CONFIG_TRACING
73#define TRACE_PRINTKS() VMLINUX_SYMBOL(__start___trace_bprintk_fmt) = .; \
74 *(__trace_printk_fmt) /* Trace_printk fmt' pointer */ \
75 VMLINUX_SYMBOL(__stop___trace_bprintk_fmt) = .;
76#else
77#define TRACE_PRINTKS()
78#endif
79
Sam Ravnborgca967252007-05-17 13:38:44 +020080/* .data section */
81#define DATA_DATA \
Sam Ravnborg0e0d3142007-05-17 20:14:48 +020082 *(.data) \
Mathieu Desnoyers8256e472007-10-18 23:41:06 -070083 *(.data.init.refok) \
Sam Ravnborg312b1482008-01-28 20:21:15 +010084 *(.ref.data) \
Sam Ravnborgeb8f6892008-01-20 20:07:28 +010085 DEV_KEEP(init.data) \
86 DEV_KEEP(exit.data) \
87 CPU_KEEP(init.data) \
88 CPU_KEEP(exit.data) \
89 MEM_KEEP(init.data) \
90 MEM_KEEP(exit.data) \
Mathieu Desnoyers8256e472007-10-18 23:41:06 -070091 . = ALIGN(8); \
92 VMLINUX_SYMBOL(__start___markers) = .; \
93 *(__markers) \
Mathieu Desnoyers97e1c182008-07-18 12:16:16 -040094 VMLINUX_SYMBOL(__stop___markers) = .; \
Mathieu Desnoyers7e066fb2008-11-14 17:47:47 -050095 . = ALIGN(32); \
Mathieu Desnoyers97e1c182008-07-18 12:16:16 -040096 VMLINUX_SYMBOL(__start___tracepoints) = .; \
97 *(__tracepoints) \
Steven Rostedt1f0d69a2008-11-12 00:14:39 -050098 VMLINUX_SYMBOL(__stop___tracepoints) = .; \
Steven Rostedt2bcd5212008-11-21 01:30:54 -050099 LIKELY_PROFILE() \
Steven Rostedtb77e38a2009-02-24 10:21:36 -0500100 BRANCH_PROFILE() \
Ingo Molnar8a20d842009-03-09 10:09:06 +0100101 TRACE_PRINTKS() \
Steven Rostedtb77e38a2009-02-24 10:21:36 -0500102 FTRACE_EVENTS()
Sam Ravnborgca967252007-05-17 13:38:44 +0200103
Sam Ravnborg4096b462007-05-29 21:29:00 +0200104#define RO_DATA(align) \
105 . = ALIGN((align)); \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
Vivek Goyal65695802006-12-07 02:14:03 +0100107 VMLINUX_SYMBOL(__start_rodata) = .; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108 *(.rodata) *(.rodata.*) \
109 *(__vermagic) /* Kernel version magic */ \
Mathieu Desnoyers8256e472007-10-18 23:41:06 -0700110 *(__markers_strings) /* Markers: strings */ \
Mathieu Desnoyers97e1c182008-07-18 12:16:16 -0400111 *(__tracepoints_strings)/* Tracepoints: strings */ \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700112 } \
113 \
114 .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
115 *(.rodata1) \
116 } \
117 \
Jan Beulich6360b1f2008-05-12 15:44:41 +0200118 BUG_TABLE \
119 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120 /* PCI quirks */ \
121 .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \
122 VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \
123 *(.pci_fixup_early) \
124 VMLINUX_SYMBOL(__end_pci_fixups_early) = .; \
125 VMLINUX_SYMBOL(__start_pci_fixups_header) = .; \
126 *(.pci_fixup_header) \
127 VMLINUX_SYMBOL(__end_pci_fixups_header) = .; \
128 VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \
129 *(.pci_fixup_final) \
130 VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \
131 VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \
132 *(.pci_fixup_enable) \
133 VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \
Alan Cox1597cac2006-12-04 15:14:45 -0800134 VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \
135 *(.pci_fixup_resume) \
136 VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \
Rafael J. Wysockie1a2a512008-05-15 21:51:31 +0200137 VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .; \
138 *(.pci_fixup_resume_early) \
139 VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .; \
140 VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .; \
141 *(.pci_fixup_suspend) \
142 VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143 } \
144 \
David Woodhouse5658c762008-05-23 13:52:42 +0100145 /* Built-in firmware blobs */ \
146 .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) { \
147 VMLINUX_SYMBOL(__start_builtin_fw) = .; \
148 *(.builtin_fw) \
149 VMLINUX_SYMBOL(__end_builtin_fw) = .; \
150 } \
151 \
Matt Porter394b7012005-11-07 01:00:15 -0800152 /* RapidIO route ops */ \
153 .rio_route : AT(ADDR(.rio_route) - LOAD_OFFSET) { \
154 VMLINUX_SYMBOL(__start_rio_route_ops) = .; \
155 *(.rio_route_ops) \
156 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \
157 } \
158 \
Jan Beulich63687a52008-05-12 15:44:41 +0200159 TRACEDATA \
160 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161 /* Kernel symbol table: Normal symbols */ \
162 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
163 VMLINUX_SYMBOL(__start___ksymtab) = .; \
164 *(__ksymtab) \
165 VMLINUX_SYMBOL(__stop___ksymtab) = .; \
166 } \
167 \
168 /* Kernel symbol table: GPL-only symbols */ \
169 __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
170 VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
171 *(__ksymtab_gpl) \
172 VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
173 } \
174 \
Arjan van de Venf71d20e2006-06-28 04:26:45 -0700175 /* Kernel symbol table: Normal unused symbols */ \
176 __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \
177 VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \
178 *(__ksymtab_unused) \
179 VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \
180 } \
181 \
182 /* Kernel symbol table: GPL-only unused symbols */ \
183 __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
184 VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \
185 *(__ksymtab_unused_gpl) \
186 VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \
187 } \
188 \
Greg Kroah-Hartman9f28bb72006-03-20 13:17:13 -0800189 /* Kernel symbol table: GPL-future-only symbols */ \
190 __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
191 VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \
192 *(__ksymtab_gpl_future) \
193 VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \
194 } \
195 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196 /* Kernel symbol table: Normal symbols */ \
197 __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
198 VMLINUX_SYMBOL(__start___kcrctab) = .; \
199 *(__kcrctab) \
200 VMLINUX_SYMBOL(__stop___kcrctab) = .; \
201 } \
202 \
203 /* Kernel symbol table: GPL-only symbols */ \
204 __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \
205 VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \
206 *(__kcrctab_gpl) \
207 VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \
208 } \
209 \
Arjan van de Venf71d20e2006-06-28 04:26:45 -0700210 /* Kernel symbol table: Normal unused symbols */ \
211 __kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \
212 VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \
213 *(__kcrctab_unused) \
214 VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \
215 } \
216 \
217 /* Kernel symbol table: GPL-only unused symbols */ \
218 __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \
219 VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \
220 *(__kcrctab_unused_gpl) \
221 VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \
222 } \
223 \
Greg Kroah-Hartman9f28bb72006-03-20 13:17:13 -0800224 /* Kernel symbol table: GPL-future-only symbols */ \
225 __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
226 VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \
227 *(__kcrctab_gpl_future) \
228 VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \
229 } \
230 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700231 /* Kernel symbol table: strings */ \
232 __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
233 *(__ksymtab_strings) \
234 } \
235 \
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100236 /* __*init sections */ \
237 __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \
Sam Ravnborg312b1482008-01-28 20:21:15 +0100238 *(.ref.rodata) \
Steven Rostedt8da38212008-08-14 15:45:07 -0400239 MCOUNT_REC() \
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100240 DEV_KEEP(init.rodata) \
241 DEV_KEEP(exit.rodata) \
242 CPU_KEEP(init.rodata) \
243 CPU_KEEP(exit.rodata) \
244 MEM_KEEP(init.rodata) \
245 MEM_KEEP(exit.rodata) \
246 } \
247 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700248 /* Built-in module parameters. */ \
249 __param : AT(ADDR(__param) - LOAD_OFFSET) { \
250 VMLINUX_SYMBOL(__start___param) = .; \
251 *(__param) \
252 VMLINUX_SYMBOL(__stop___param) = .; \
Arjan van de Venedeed302008-01-30 13:34:08 +0100253 . = ALIGN((align)); \
Vivek Goyal65695802006-12-07 02:14:03 +0100254 VMLINUX_SYMBOL(__end_rodata) = .; \
Marcelo Tosatti7583ddf2006-09-27 01:51:02 -0700255 } \
Sam Ravnborg4096b462007-05-29 21:29:00 +0200256 . = ALIGN((align));
257
258/* RODATA provided for backward compatibility.
259 * All archs are supposed to use RO_DATA() */
260#define RODATA RO_DATA(4096)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700261
262#define SECURITY_INIT \
Eric W. Biederman60bad7f2005-06-25 14:57:46 -0700263 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700264 VMLINUX_SYMBOL(__security_initcall_start) = .; \
265 *(.security_initcall.init) \
266 VMLINUX_SYMBOL(__security_initcall_end) = .; \
267 }
268
Sam Ravnborg76647092007-05-13 00:31:33 +0200269/* .text section. Map to function alignment to avoid address changes
270 * during second ld run in second ld pass when generating System.map */
271#define TEXT_TEXT \
272 ALIGN_FUNCTION(); \
Jan Beulichfb5e2b32008-06-18 12:36:01 +0100273 *(.text.hot) \
Sam Ravnborg0e0d3142007-05-17 20:14:48 +0200274 *(.text) \
Sam Ravnborg312b1482008-01-28 20:21:15 +0100275 *(.ref.text) \
Al Viro23ec23c2007-10-13 08:40:24 +0100276 *(.text.init.refok) \
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100277 *(.exit.text.refok) \
278 DEV_KEEP(init.text) \
279 DEV_KEEP(exit.text) \
280 CPU_KEEP(init.text) \
281 CPU_KEEP(exit.text) \
282 MEM_KEEP(init.text) \
Jan Beulichfb5e2b32008-06-18 12:36:01 +0100283 MEM_KEEP(exit.text) \
284 *(.text.unlikely)
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100285
Sam Ravnborg76647092007-05-13 00:31:33 +0200286
Sam Ravnborg6d30e3a2005-07-14 20:15:44 +0000287/* sched.text is aling to function alignment to secure we have same
288 * address even at second ld pass when generating System.map */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289#define SCHED_TEXT \
Sam Ravnborg6d30e3a2005-07-14 20:15:44 +0000290 ALIGN_FUNCTION(); \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700291 VMLINUX_SYMBOL(__sched_text_start) = .; \
292 *(.sched.text) \
293 VMLINUX_SYMBOL(__sched_text_end) = .;
294
Sam Ravnborg6d30e3a2005-07-14 20:15:44 +0000295/* spinlock.text is aling to function alignment to secure we have same
296 * address even at second ld pass when generating System.map */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700297#define LOCK_TEXT \
Sam Ravnborg6d30e3a2005-07-14 20:15:44 +0000298 ALIGN_FUNCTION(); \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700299 VMLINUX_SYMBOL(__lock_text_start) = .; \
300 *(.spinlock.text) \
301 VMLINUX_SYMBOL(__lock_text_end) = .;
Prasanna S Panchamukhid0aaff92005-09-06 15:19:26 -0700302
303#define KPROBES_TEXT \
304 ALIGN_FUNCTION(); \
305 VMLINUX_SYMBOL(__kprobes_text_start) = .; \
306 *(.kprobes.text) \
307 VMLINUX_SYMBOL(__kprobes_text_end) = .;
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +0200308
Frederic Weisbeckera0343e82008-12-09 23:53:16 +0100309#ifdef CONFIG_FUNCTION_GRAPH_TRACER
310#define IRQENTRY_TEXT \
311 ALIGN_FUNCTION(); \
312 VMLINUX_SYMBOL(__irqentry_text_start) = .; \
313 *(.irqentry.text) \
314 VMLINUX_SYMBOL(__irqentry_text_end) = .;
315#else
316#define IRQENTRY_TEXT
317#endif
318
Sam Ravnborg37c514e2008-02-19 21:00:18 +0100319/* Section used for early init (in .S files) */
320#define HEAD_TEXT *(.head.text)
321
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100322/* init and exit section handling */
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100323#define INIT_DATA \
324 *(.init.data) \
325 DEV_DISCARD(init.data) \
326 DEV_DISCARD(init.rodata) \
327 CPU_DISCARD(init.data) \
328 CPU_DISCARD(init.rodata) \
329 MEM_DISCARD(init.data) \
Jason Baron346e15b2008-08-12 16:46:19 -0400330 MEM_DISCARD(init.rodata) \
331 /* implement dynamic printk debug */ \
332 VMLINUX_SYMBOL(__start___verbose_strings) = .; \
333 *(__verbose_strings) \
334 VMLINUX_SYMBOL(__stop___verbose_strings) = .; \
335 . = ALIGN(8); \
336 VMLINUX_SYMBOL(__start___verbose) = .; \
337 *(__verbose) \
338 VMLINUX_SYMBOL(__stop___verbose) = .;
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100339
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100340#define INIT_TEXT \
341 *(.init.text) \
342 DEV_DISCARD(init.text) \
343 CPU_DISCARD(init.text) \
344 MEM_DISCARD(init.text)
345
346#define EXIT_DATA \
347 *(.exit.data) \
348 DEV_DISCARD(exit.data) \
349 DEV_DISCARD(exit.rodata) \
350 CPU_DISCARD(exit.data) \
351 CPU_DISCARD(exit.rodata) \
352 MEM_DISCARD(exit.data) \
353 MEM_DISCARD(exit.rodata)
354
355#define EXIT_TEXT \
356 *(.exit.text) \
357 DEV_DISCARD(exit.text) \
358 CPU_DISCARD(exit.text) \
359 MEM_DISCARD(exit.text)
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100360
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +0200361 /* DWARF debug sections.
362 Symbols in the DWARF debugging sections are relative to
363 the beginning of the section so we begin them at 0. */
364#define DWARF_DEBUG \
365 /* DWARF 1 */ \
366 .debug 0 : { *(.debug) } \
367 .line 0 : { *(.line) } \
368 /* GNU DWARF 1 extensions */ \
369 .debug_srcinfo 0 : { *(.debug_srcinfo) } \
370 .debug_sfnames 0 : { *(.debug_sfnames) } \
371 /* DWARF 1.1 and DWARF 2 */ \
372 .debug_aranges 0 : { *(.debug_aranges) } \
373 .debug_pubnames 0 : { *(.debug_pubnames) } \
374 /* DWARF 2 */ \
375 .debug_info 0 : { *(.debug_info \
376 .gnu.linkonce.wi.*) } \
377 .debug_abbrev 0 : { *(.debug_abbrev) } \
378 .debug_line 0 : { *(.debug_line) } \
379 .debug_frame 0 : { *(.debug_frame) } \
380 .debug_str 0 : { *(.debug_str) } \
381 .debug_loc 0 : { *(.debug_loc) } \
382 .debug_macinfo 0 : { *(.debug_macinfo) } \
383 /* SGI/MIPS DWARF 2 extensions */ \
384 .debug_weaknames 0 : { *(.debug_weaknames) } \
385 .debug_funcnames 0 : { *(.debug_funcnames) } \
386 .debug_typenames 0 : { *(.debug_typenames) } \
387 .debug_varnames 0 : { *(.debug_varnames) } \
388
389 /* Stabs debugging sections. */
390#define STABS_DEBUG \
391 .stab 0 : { *(.stab) } \
392 .stabstr 0 : { *(.stabstr) } \
393 .stab.excl 0 : { *(.stab.excl) } \
394 .stab.exclstr 0 : { *(.stab.exclstr) } \
395 .stab.index 0 : { *(.stab.index) } \
396 .stab.indexstr 0 : { *(.stab.indexstr) } \
397 .comment 0 : { *(.comment) }
Jeremy Fitzhardinge9c9b8b32006-09-25 23:32:26 -0700398
Jan Beulich6360b1f2008-05-12 15:44:41 +0200399#ifdef CONFIG_GENERIC_BUG
Jeremy Fitzhardinge7664c5a2006-12-08 02:36:19 -0800400#define BUG_TABLE \
401 . = ALIGN(8); \
402 __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700403 VMLINUX_SYMBOL(__start___bug_table) = .; \
Jeremy Fitzhardinge7664c5a2006-12-08 02:36:19 -0800404 *(__bug_table) \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700405 VMLINUX_SYMBOL(__stop___bug_table) = .; \
Jeremy Fitzhardinge7664c5a2006-12-08 02:36:19 -0800406 }
Jan Beulich6360b1f2008-05-12 15:44:41 +0200407#else
408#define BUG_TABLE
409#endif
Jeremy Fitzhardinge7664c5a2006-12-08 02:36:19 -0800410
Jan Beulich63687a52008-05-12 15:44:41 +0200411#ifdef CONFIG_PM_TRACE
412#define TRACEDATA \
413 . = ALIGN(4); \
414 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700415 VMLINUX_SYMBOL(__tracedata_start) = .; \
Jan Beulich63687a52008-05-12 15:44:41 +0200416 *(.tracedata) \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700417 VMLINUX_SYMBOL(__tracedata_end) = .; \
Jan Beulich63687a52008-05-12 15:44:41 +0200418 }
419#else
420#define TRACEDATA
421#endif
422
Jeremy Fitzhardinge9c9b8b32006-09-25 23:32:26 -0700423#define NOTES \
Roland McGrathcbe87122007-07-19 01:48:36 -0700424 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \
425 VMLINUX_SYMBOL(__start_notes) = .; \
426 *(.note.*) \
427 VMLINUX_SYMBOL(__stop_notes) = .; \
428 }
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700429
430#define INITCALLS \
Eduard - Gabriel Munteanuc2147a52008-07-25 19:45:11 -0700431 *(.initcallearly.init) \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700432 VMLINUX_SYMBOL(__early_initcall_end) = .; \
Linus Torvaldsb3438f82006-11-20 11:47:18 -0800433 *(.initcall0.init) \
434 *(.initcall0s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700435 *(.initcall1.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700436 *(.initcall1s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700437 *(.initcall2.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700438 *(.initcall2s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700439 *(.initcall3.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700440 *(.initcall3s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700441 *(.initcall4.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700442 *(.initcall4s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700443 *(.initcall5.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700444 *(.initcall5s.init) \
Linus Torvalds8d610dd2006-12-11 12:12:04 -0800445 *(.initcallrootfs.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700446 *(.initcall6.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700447 *(.initcall6s.init) \
448 *(.initcall7.init) \
449 *(.initcall7s.init)
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700450
Fenghua Yu5fb7dc32007-07-19 01:48:12 -0700451#define PERCPU(align) \
452 . = ALIGN(align); \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700453 VMLINUX_SYMBOL(__per_cpu_start) = .; \
Fenghua Yu5fb7dc32007-07-19 01:48:12 -0700454 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \
Eric Dumazet63cc8c72008-05-12 15:44:40 +0200455 *(.data.percpu.page_aligned) \
Fenghua Yu5fb7dc32007-07-19 01:48:12 -0700456 *(.data.percpu) \
457 *(.data.percpu.shared_aligned) \
458 } \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700459 VMLINUX_SYMBOL(__per_cpu_end) = .;