ia64/xen-unstable

view xen/arch/x86/x86_32/xen.lds.S @ 18594:5e4e234d58be

x86: Define __per_cpu_shift label to help kdump/crashdump.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Oct 08 13:11:06 2008 +0100 (2008-10-08)
parents 71bfeeb0b321
children 7989e3999e83
line source
1 /* ld script to make i386 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
3 * Modified for i386 Xen by Keir Fraser
4 */
6 #include <xen/config.h>
7 #include <asm/page.h>
8 #include <asm/percpu.h>
9 #undef ENTRY
10 #undef ALIGN
12 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
13 OUTPUT_ARCH(i386)
14 ENTRY(start)
15 PHDRS
16 {
17 text PT_LOAD ;
18 }
19 SECTIONS
20 {
21 . = 0xFF000000 + 0x100000;
22 _start = .;
23 _stext = .; /* Text and read-only data */
24 .text : {
25 *(.text)
26 *(.fixup)
27 *(.gnu.warning)
28 } :text =0x9090
29 .text.lock : { *(.text.lock) } :text /* out-of-line lock text */
31 _etext = .; /* End of text section */
33 .rodata : { *(.rodata) *(.rodata.*) } :text
35 . = ALIGN(32); /* Exception table */
36 __start___ex_table = .;
37 __ex_table : { *(__ex_table) } :text
38 __stop___ex_table = .;
40 . = ALIGN(32); /* Pre-exception table */
41 __start___pre_ex_table = .;
42 __pre_ex_table : { *(__pre_ex_table) } :text
43 __stop___pre_ex_table = .;
45 .data : { /* Data */
46 *(.data)
47 CONSTRUCTORS
48 } :text
50 . = ALIGN(128);
51 .data.read_mostly : { *(.data.read_mostly) } :text
53 . = ALIGN(4096); /* Init code and data */
54 __init_begin = .;
55 _sinittext = .;
56 .init.text : { *(.init.text) } :text
57 _einittext = .;
58 .init.data : { *(.init.data) } :text
59 . = ALIGN(32);
60 __setup_start = .;
61 .init.setup : { *(.init.setup) } :text
62 __setup_end = .;
63 __initcall_start = .;
64 .initcall.init : { *(.initcall1.init) } :text
65 __initcall_end = .;
66 __xsm_initcall_start = .;
67 .xsm_initcall.init : { *(.xsm_initcall.init) } :text
68 __xsm_initcall_end = .;
69 . = ALIGN(PAGE_SIZE);
70 __init_end = .;
72 __per_cpu_shift = PERCPU_SHIFT; /* kdump assist */
73 __per_cpu_start = .;
74 .data.percpu : { *(.data.percpu) } :text
75 __per_cpu_data_end = .;
76 . = __per_cpu_start + (NR_CPUS << PERCPU_SHIFT);
77 . = ALIGN(PAGE_SIZE);
78 __per_cpu_end = .;
80 __bss_start = .; /* BSS */
81 .bss : {
82 . = ALIGN(STACK_SIZE);
83 *(.bss.stack_aligned)
84 . = ALIGN(PAGE_SIZE);
85 *(.bss.page_aligned)
86 *(.bss)
87 } :text
88 _end = . ;
90 /* Sections to be discarded */
91 /DISCARD/ : {
92 *(.exit.text)
93 *(.exit.data)
94 *(.exitcall.exit)
95 }
97 /* Stabs debugging sections. */
98 .stab 0 : { *(.stab) }
99 .stabstr 0 : { *(.stabstr) }
100 .stab.excl 0 : { *(.stab.excl) }
101 .stab.exclstr 0 : { *(.stab.exclstr) }
102 .stab.index 0 : { *(.stab.index) }
103 .stab.indexstr 0 : { *(.stab.indexstr) }
104 .comment 0 : { *(.comment) }
105 }