blob: 0add6b28c366615d36cb35d8d7e87e4cb1b4cf0a [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
Sam Ravnborgca967252007-05-17 13:38:44 +020072/* .data section */
73#define DATA_DATA \
Sam Ravnborg0e0d3142007-05-17 20:14:48 +020074 *(.data) \
Mathieu Desnoyers8256e472007-10-18 23:41:06 -070075 *(.data.init.refok) \
Sam Ravnborg312b1482008-01-28 20:21:15 +010076 *(.ref.data) \
Sam Ravnborgeb8f6892008-01-20 20:07:28 +010077 DEV_KEEP(init.data) \
78 DEV_KEEP(exit.data) \
79 CPU_KEEP(init.data) \
80 CPU_KEEP(exit.data) \
81 MEM_KEEP(init.data) \
82 MEM_KEEP(exit.data) \
Mathieu Desnoyers8256e472007-10-18 23:41:06 -070083 . = ALIGN(8); \
84 VMLINUX_SYMBOL(__start___markers) = .; \
85 *(__markers) \
Mathieu Desnoyers97e1c182008-07-18 12:16:16 -040086 VMLINUX_SYMBOL(__stop___markers) = .; \
Mathieu Desnoyers7e066fb2008-11-14 17:47:47 -050087 . = ALIGN(32); \
Mathieu Desnoyers97e1c182008-07-18 12:16:16 -040088 VMLINUX_SYMBOL(__start___tracepoints) = .; \
89 *(__tracepoints) \
Steven Rostedt1f0d69a2008-11-12 00:14:39 -050090 VMLINUX_SYMBOL(__stop___tracepoints) = .; \
Steven Rostedt2bcd5212008-11-21 01:30:54 -050091 LIKELY_PROFILE() \
Steven Rostedtb77e38a2009-02-24 10:21:36 -050092 BRANCH_PROFILE() \
93 FTRACE_EVENTS()
Sam Ravnborgca967252007-05-17 13:38:44 +020094
Sam Ravnborg4096b462007-05-29 21:29:00 +020095#define RO_DATA(align) \
96 . = ALIGN((align)); \
Linus Torvalds1da177e2005-04-16 15:20:36 -070097 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
Vivek Goyal65695802006-12-07 02:14:03 +010098 VMLINUX_SYMBOL(__start_rodata) = .; \
Linus Torvalds1da177e2005-04-16 15:20:36 -070099 *(.rodata) *(.rodata.*) \
100 *(__vermagic) /* Kernel version magic */ \
Mathieu Desnoyers8256e472007-10-18 23:41:06 -0700101 *(__markers_strings) /* Markers: strings */ \
Mathieu Desnoyers97e1c182008-07-18 12:16:16 -0400102 *(__tracepoints_strings)/* Tracepoints: strings */ \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103 } \
104 \
105 .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
106 *(.rodata1) \
107 } \
108 \
Jan Beulich6360b1f2008-05-12 15:44:41 +0200109 BUG_TABLE \
110 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111 /* PCI quirks */ \
112 .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \
113 VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \
114 *(.pci_fixup_early) \
115 VMLINUX_SYMBOL(__end_pci_fixups_early) = .; \
116 VMLINUX_SYMBOL(__start_pci_fixups_header) = .; \
117 *(.pci_fixup_header) \
118 VMLINUX_SYMBOL(__end_pci_fixups_header) = .; \
119 VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \
120 *(.pci_fixup_final) \
121 VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \
122 VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \
123 *(.pci_fixup_enable) \
124 VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \
Alan Cox1597cac2006-12-04 15:14:45 -0800125 VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \
126 *(.pci_fixup_resume) \
127 VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \
Rafael J. Wysockie1a2a512008-05-15 21:51:31 +0200128 VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .; \
129 *(.pci_fixup_resume_early) \
130 VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .; \
131 VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .; \
132 *(.pci_fixup_suspend) \
133 VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .; \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134 } \
135 \
David Woodhouse5658c762008-05-23 13:52:42 +0100136 /* Built-in firmware blobs */ \
137 .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) { \
138 VMLINUX_SYMBOL(__start_builtin_fw) = .; \
139 *(.builtin_fw) \
140 VMLINUX_SYMBOL(__end_builtin_fw) = .; \
141 } \
142 \
Matt Porter394b7012005-11-07 01:00:15 -0800143 /* RapidIO route ops */ \
144 .rio_route : AT(ADDR(.rio_route) - LOAD_OFFSET) { \
145 VMLINUX_SYMBOL(__start_rio_route_ops) = .; \
146 *(.rio_route_ops) \
147 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \
148 } \
149 \
Jan Beulich63687a52008-05-12 15:44:41 +0200150 TRACEDATA \
151 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700152 /* Kernel symbol table: Normal symbols */ \
153 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
154 VMLINUX_SYMBOL(__start___ksymtab) = .; \
155 *(__ksymtab) \
156 VMLINUX_SYMBOL(__stop___ksymtab) = .; \
157 } \
158 \
159 /* Kernel symbol table: GPL-only symbols */ \
160 __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
161 VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
162 *(__ksymtab_gpl) \
163 VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
164 } \
165 \
Arjan van de Venf71d20e2006-06-28 04:26:45 -0700166 /* Kernel symbol table: Normal unused symbols */ \
167 __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \
168 VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \
169 *(__ksymtab_unused) \
170 VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \
171 } \
172 \
173 /* Kernel symbol table: GPL-only unused symbols */ \
174 __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
175 VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \
176 *(__ksymtab_unused_gpl) \
177 VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \
178 } \
179 \
Greg Kroah-Hartman9f28bb72006-03-20 13:17:13 -0800180 /* Kernel symbol table: GPL-future-only symbols */ \
181 __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
182 VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \
183 *(__ksymtab_gpl_future) \
184 VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \
185 } \
186 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700187 /* Kernel symbol table: Normal symbols */ \
188 __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
189 VMLINUX_SYMBOL(__start___kcrctab) = .; \
190 *(__kcrctab) \
191 VMLINUX_SYMBOL(__stop___kcrctab) = .; \
192 } \
193 \
194 /* Kernel symbol table: GPL-only symbols */ \
195 __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \
196 VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \
197 *(__kcrctab_gpl) \
198 VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \
199 } \
200 \
Arjan van de Venf71d20e2006-06-28 04:26:45 -0700201 /* Kernel symbol table: Normal unused symbols */ \
202 __kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \
203 VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \
204 *(__kcrctab_unused) \
205 VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \
206 } \
207 \
208 /* Kernel symbol table: GPL-only unused symbols */ \
209 __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \
210 VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \
211 *(__kcrctab_unused_gpl) \
212 VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \
213 } \
214 \
Greg Kroah-Hartman9f28bb72006-03-20 13:17:13 -0800215 /* Kernel symbol table: GPL-future-only symbols */ \
216 __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
217 VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \
218 *(__kcrctab_gpl_future) \
219 VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .; \
220 } \
221 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700222 /* Kernel symbol table: strings */ \
223 __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
224 *(__ksymtab_strings) \
225 } \
226 \
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100227 /* __*init sections */ \
228 __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \
Sam Ravnborg312b1482008-01-28 20:21:15 +0100229 *(.ref.rodata) \
Steven Rostedt8da38212008-08-14 15:45:07 -0400230 MCOUNT_REC() \
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100231 DEV_KEEP(init.rodata) \
232 DEV_KEEP(exit.rodata) \
233 CPU_KEEP(init.rodata) \
234 CPU_KEEP(exit.rodata) \
235 MEM_KEEP(init.rodata) \
236 MEM_KEEP(exit.rodata) \
237 } \
238 \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700239 /* Built-in module parameters. */ \
240 __param : AT(ADDR(__param) - LOAD_OFFSET) { \
241 VMLINUX_SYMBOL(__start___param) = .; \
242 *(__param) \
243 VMLINUX_SYMBOL(__stop___param) = .; \
Arjan van de Venedeed302008-01-30 13:34:08 +0100244 . = ALIGN((align)); \
Vivek Goyal65695802006-12-07 02:14:03 +0100245 VMLINUX_SYMBOL(__end_rodata) = .; \
Marcelo Tosatti7583ddf2006-09-27 01:51:02 -0700246 } \
Sam Ravnborg4096b462007-05-29 21:29:00 +0200247 . = ALIGN((align));
248
249/* RODATA provided for backward compatibility.
250 * All archs are supposed to use RO_DATA() */
251#define RODATA RO_DATA(4096)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252
253#define SECURITY_INIT \
Eric W. Biederman60bad7f2005-06-25 14:57:46 -0700254 .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700255 VMLINUX_SYMBOL(__security_initcall_start) = .; \
256 *(.security_initcall.init) \
257 VMLINUX_SYMBOL(__security_initcall_end) = .; \
258 }
259
Sam Ravnborg76647092007-05-13 00:31:33 +0200260/* .text section. Map to function alignment to avoid address changes
261 * during second ld run in second ld pass when generating System.map */
262#define TEXT_TEXT \
263 ALIGN_FUNCTION(); \
Jan Beulichfb5e2b32008-06-18 12:36:01 +0100264 *(.text.hot) \
Sam Ravnborg0e0d3142007-05-17 20:14:48 +0200265 *(.text) \
Sam Ravnborg312b1482008-01-28 20:21:15 +0100266 *(.ref.text) \
Al Viro23ec23c2007-10-13 08:40:24 +0100267 *(.text.init.refok) \
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100268 *(.exit.text.refok) \
269 DEV_KEEP(init.text) \
270 DEV_KEEP(exit.text) \
271 CPU_KEEP(init.text) \
272 CPU_KEEP(exit.text) \
273 MEM_KEEP(init.text) \
Jan Beulichfb5e2b32008-06-18 12:36:01 +0100274 MEM_KEEP(exit.text) \
275 *(.text.unlikely)
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100276
Sam Ravnborg76647092007-05-13 00:31:33 +0200277
Sam Ravnborg6d30e3a2005-07-14 20:15:44 +0000278/* sched.text is aling to function alignment to secure we have same
279 * address even at second ld pass when generating System.map */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280#define SCHED_TEXT \
Sam Ravnborg6d30e3a2005-07-14 20:15:44 +0000281 ALIGN_FUNCTION(); \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282 VMLINUX_SYMBOL(__sched_text_start) = .; \
283 *(.sched.text) \
284 VMLINUX_SYMBOL(__sched_text_end) = .;
285
Sam Ravnborg6d30e3a2005-07-14 20:15:44 +0000286/* spinlock.text is aling to function alignment to secure we have same
287 * address even at second ld pass when generating System.map */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700288#define LOCK_TEXT \
Sam Ravnborg6d30e3a2005-07-14 20:15:44 +0000289 ALIGN_FUNCTION(); \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700290 VMLINUX_SYMBOL(__lock_text_start) = .; \
291 *(.spinlock.text) \
292 VMLINUX_SYMBOL(__lock_text_end) = .;
Prasanna S Panchamukhid0aaff92005-09-06 15:19:26 -0700293
294#define KPROBES_TEXT \
295 ALIGN_FUNCTION(); \
296 VMLINUX_SYMBOL(__kprobes_text_start) = .; \
297 *(.kprobes.text) \
298 VMLINUX_SYMBOL(__kprobes_text_end) = .;
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +0200299
Frederic Weisbeckera0343e82008-12-09 23:53:16 +0100300#ifdef CONFIG_FUNCTION_GRAPH_TRACER
301#define IRQENTRY_TEXT \
302 ALIGN_FUNCTION(); \
303 VMLINUX_SYMBOL(__irqentry_text_start) = .; \
304 *(.irqentry.text) \
305 VMLINUX_SYMBOL(__irqentry_text_end) = .;
306#else
307#define IRQENTRY_TEXT
308#endif
309
Sam Ravnborg37c514e2008-02-19 21:00:18 +0100310/* Section used for early init (in .S files) */
311#define HEAD_TEXT *(.head.text)
312
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100313/* init and exit section handling */
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100314#define INIT_DATA \
315 *(.init.data) \
316 DEV_DISCARD(init.data) \
317 DEV_DISCARD(init.rodata) \
318 CPU_DISCARD(init.data) \
319 CPU_DISCARD(init.rodata) \
320 MEM_DISCARD(init.data) \
Jason Baron346e15b2008-08-12 16:46:19 -0400321 MEM_DISCARD(init.rodata) \
322 /* implement dynamic printk debug */ \
323 VMLINUX_SYMBOL(__start___verbose_strings) = .; \
324 *(__verbose_strings) \
325 VMLINUX_SYMBOL(__stop___verbose_strings) = .; \
326 . = ALIGN(8); \
327 VMLINUX_SYMBOL(__start___verbose) = .; \
328 *(__verbose) \
329 VMLINUX_SYMBOL(__stop___verbose) = .;
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100330
Sam Ravnborgeb8f6892008-01-20 20:07:28 +0100331#define INIT_TEXT \
332 *(.init.text) \
333 DEV_DISCARD(init.text) \
334 CPU_DISCARD(init.text) \
335 MEM_DISCARD(init.text)
336
337#define EXIT_DATA \
338 *(.exit.data) \
339 DEV_DISCARD(exit.data) \
340 DEV_DISCARD(exit.rodata) \
341 CPU_DISCARD(exit.data) \
342 CPU_DISCARD(exit.rodata) \
343 MEM_DISCARD(exit.data) \
344 MEM_DISCARD(exit.rodata)
345
346#define EXIT_TEXT \
347 *(.exit.text) \
348 DEV_DISCARD(exit.text) \
349 CPU_DISCARD(exit.text) \
350 MEM_DISCARD(exit.text)
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100351
Paolo 'Blaisorblade' Giarrussoa7d0c212005-09-10 19:44:54 +0200352 /* DWARF debug sections.
353 Symbols in the DWARF debugging sections are relative to
354 the beginning of the section so we begin them at 0. */
355#define DWARF_DEBUG \
356 /* DWARF 1 */ \
357 .debug 0 : { *(.debug) } \
358 .line 0 : { *(.line) } \
359 /* GNU DWARF 1 extensions */ \
360 .debug_srcinfo 0 : { *(.debug_srcinfo) } \
361 .debug_sfnames 0 : { *(.debug_sfnames) } \
362 /* DWARF 1.1 and DWARF 2 */ \
363 .debug_aranges 0 : { *(.debug_aranges) } \
364 .debug_pubnames 0 : { *(.debug_pubnames) } \
365 /* DWARF 2 */ \
366 .debug_info 0 : { *(.debug_info \
367 .gnu.linkonce.wi.*) } \
368 .debug_abbrev 0 : { *(.debug_abbrev) } \
369 .debug_line 0 : { *(.debug_line) } \
370 .debug_frame 0 : { *(.debug_frame) } \
371 .debug_str 0 : { *(.debug_str) } \
372 .debug_loc 0 : { *(.debug_loc) } \
373 .debug_macinfo 0 : { *(.debug_macinfo) } \
374 /* SGI/MIPS DWARF 2 extensions */ \
375 .debug_weaknames 0 : { *(.debug_weaknames) } \
376 .debug_funcnames 0 : { *(.debug_funcnames) } \
377 .debug_typenames 0 : { *(.debug_typenames) } \
378 .debug_varnames 0 : { *(.debug_varnames) } \
379
380 /* Stabs debugging sections. */
381#define STABS_DEBUG \
382 .stab 0 : { *(.stab) } \
383 .stabstr 0 : { *(.stabstr) } \
384 .stab.excl 0 : { *(.stab.excl) } \
385 .stab.exclstr 0 : { *(.stab.exclstr) } \
386 .stab.index 0 : { *(.stab.index) } \
387 .stab.indexstr 0 : { *(.stab.indexstr) } \
388 .comment 0 : { *(.comment) }
Jeremy Fitzhardinge9c9b8b32006-09-25 23:32:26 -0700389
Jan Beulich6360b1f2008-05-12 15:44:41 +0200390#ifdef CONFIG_GENERIC_BUG
Jeremy Fitzhardinge7664c5a2006-12-08 02:36:19 -0800391#define BUG_TABLE \
392 . = ALIGN(8); \
393 __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700394 VMLINUX_SYMBOL(__start___bug_table) = .; \
Jeremy Fitzhardinge7664c5a2006-12-08 02:36:19 -0800395 *(__bug_table) \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700396 VMLINUX_SYMBOL(__stop___bug_table) = .; \
Jeremy Fitzhardinge7664c5a2006-12-08 02:36:19 -0800397 }
Jan Beulich6360b1f2008-05-12 15:44:41 +0200398#else
399#define BUG_TABLE
400#endif
Jeremy Fitzhardinge7664c5a2006-12-08 02:36:19 -0800401
Jan Beulich63687a52008-05-12 15:44:41 +0200402#ifdef CONFIG_PM_TRACE
403#define TRACEDATA \
404 . = ALIGN(4); \
405 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700406 VMLINUX_SYMBOL(__tracedata_start) = .; \
Jan Beulich63687a52008-05-12 15:44:41 +0200407 *(.tracedata) \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700408 VMLINUX_SYMBOL(__tracedata_end) = .; \
Jan Beulich63687a52008-05-12 15:44:41 +0200409 }
410#else
411#define TRACEDATA
412#endif
413
Jeremy Fitzhardinge9c9b8b32006-09-25 23:32:26 -0700414#define NOTES \
Roland McGrathcbe87122007-07-19 01:48:36 -0700415 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \
416 VMLINUX_SYMBOL(__start_notes) = .; \
417 *(.note.*) \
418 VMLINUX_SYMBOL(__stop_notes) = .; \
419 }
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700420
421#define INITCALLS \
Eduard - Gabriel Munteanuc2147a52008-07-25 19:45:11 -0700422 *(.initcallearly.init) \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700423 VMLINUX_SYMBOL(__early_initcall_end) = .; \
Linus Torvaldsb3438f82006-11-20 11:47:18 -0800424 *(.initcall0.init) \
425 *(.initcall0s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700426 *(.initcall1.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700427 *(.initcall1s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700428 *(.initcall2.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700429 *(.initcall2s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700430 *(.initcall3.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700431 *(.initcall3s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700432 *(.initcall4.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700433 *(.initcall4s.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700434 *(.initcall5.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700435 *(.initcall5s.init) \
Linus Torvalds8d610dd2006-12-11 12:12:04 -0800436 *(.initcallrootfs.init) \
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700437 *(.initcall6.init) \
Andrew Morton735a7ff2006-10-27 11:42:37 -0700438 *(.initcall6s.init) \
439 *(.initcall7.init) \
440 *(.initcall7s.init)
Andrew Morton61ce1ef2006-10-27 11:41:44 -0700441
Fenghua Yu5fb7dc32007-07-19 01:48:12 -0700442#define PERCPU(align) \
443 . = ALIGN(align); \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700444 VMLINUX_SYMBOL(__per_cpu_start) = .; \
Fenghua Yu5fb7dc32007-07-19 01:48:12 -0700445 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \
Eric Dumazet63cc8c72008-05-12 15:44:40 +0200446 *(.data.percpu.page_aligned) \
Fenghua Yu5fb7dc32007-07-19 01:48:12 -0700447 *(.data.percpu) \
448 *(.data.percpu.shared_aligned) \
449 } \
Yoshinori Satoc6de00262008-07-31 00:07:29 -0700450 VMLINUX_SYMBOL(__per_cpu_end) = .;