ia64/xen-unstable

view xen/arch/x86/x86_64/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 /* Excerpts written by Martin Mares <mj@atrey.karlin.mff.cuni.cz> */
2 /* Modified for x86-64 Xen by Keir Fraser */
4 #include <xen/config.h>
5 #include <asm/page.h>
6 #include <asm/percpu.h>
7 #undef ENTRY
8 #undef ALIGN
10 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
11 OUTPUT_ARCH(i386:x86-64)
12 ENTRY(start)
13 PHDRS
14 {
15 text PT_LOAD ;
16 }
17 SECTIONS
18 {
19 . = __XEN_VIRT_START + 0x100000;
20 _start = .;
21 _stext = .; /* Text and read-only data */
22 .text : {
23 *(.text)
24 *(.fixup)
25 *(.gnu.warning)
26 } :text = 0x9090
27 .text.lock : { *(.text.lock) } :text /* out-of-line lock text */
29 _etext = .; /* End of text section */
31 .rodata : { *(.rodata) *(.rodata.*) } :text
33 . = ALIGN(32); /* Exception table */
34 __start___ex_table = .;
35 __ex_table : { *(__ex_table) } :text
36 __stop___ex_table = .;
38 . = ALIGN(32); /* Pre-exception table */
39 __start___pre_ex_table = .;
40 __pre_ex_table : { *(__pre_ex_table) } :text
41 __stop___pre_ex_table = .;
43 .data : { /* Data */
44 *(.data)
45 CONSTRUCTORS
46 } :text
48 . = ALIGN(128);
49 .data.read_mostly : { *(.data.read_mostly) } :text
51 . = ALIGN(4096); /* Init code and data */
52 __init_begin = .;
53 _sinittext = .;
54 .init.text : { *(.init.text) } :text
55 _einittext = .;
56 .init.data : { *(.init.data) } :text
57 . = ALIGN(32);
58 __setup_start = .;
59 .init.setup : { *(.init.setup) } :text
60 __setup_end = .;
61 __initcall_start = .;
62 .initcall.init : { *(.initcall1.init) } :text
63 __initcall_end = .;
64 __xsm_initcall_start = .;
65 .xsm_initcall.init : { *(.xsm_initcall.init) } :text
66 __xsm_initcall_end = .;
67 . = ALIGN(PAGE_SIZE);
68 __init_end = .;
70 __per_cpu_shift = PERCPU_SHIFT; /* kdump assist */
71 __per_cpu_start = .;
72 .data.percpu : { *(.data.percpu) } :text
73 __per_cpu_data_end = .;
74 . = __per_cpu_start + (NR_CPUS << PERCPU_SHIFT);
75 . = ALIGN(PAGE_SIZE);
76 __per_cpu_end = .;
78 __bss_start = .; /* BSS */
79 .bss : {
80 . = ALIGN(STACK_SIZE);
81 *(.bss.stack_aligned)
82 . = ALIGN(PAGE_SIZE);
83 *(.bss.page_aligned)
84 *(.bss)
85 } :text
86 _end = . ;
88 /* Sections to be discarded */
89 /DISCARD/ : {
90 *(.exit.text)
91 *(.exit.data)
92 *(.exitcall.exit)
93 }
95 /* Stabs debugging sections. */
96 .stab 0 : { *(.stab) }
97 .stabstr 0 : { *(.stabstr) }
98 .stab.excl 0 : { *(.stab.excl) }
99 .stab.exclstr 0 : { *(.stab.exclstr) }
100 .stab.index 0 : { *(.stab.index) }
101 .stab.indexstr 0 : { *(.stab.indexstr) }
102 .comment 0 : { *(.comment) }
103 }