sparc: use .data.init_task section for init_thread_union
[deliverable/linux.git] / arch / sparc / kernel / vmlinux.lds.S
1 /* ld script for sparc32/sparc64 kernel */
2
3 #include <asm-generic/vmlinux.lds.h>
4
5 #include <asm/page.h>
6 #include <asm/thread_info.h>
7
8 #ifdef CONFIG_SPARC32
9 #define INITIAL_ADDRESS 0x10000 + SIZEOF_HEADERS
10 #define TEXTSTART 0xf0004000
11
12 #define SMP_CACHE_BYTES_SHIFT 5
13
14 #else
15 #define SMP_CACHE_BYTES_SHIFT 6
16 #define INITIAL_ADDRESS 0x4000
17 #define TEXTSTART 0x0000000000404000
18
19 #endif
20
21 #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT)
22
23 #ifdef CONFIG_SPARC32
24 OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc")
25 OUTPUT_ARCH(sparc)
26 ENTRY(_start)
27 jiffies = jiffies_64 + 4;
28 #else
29 /* sparc64 */
30 OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc")
31 OUTPUT_ARCH(sparc:v9a)
32 ENTRY(_start)
33 jiffies = jiffies_64;
34 #endif
35
36 SECTIONS
37 {
38 /* swapper_low_pmd_dir is sparc64 only */
39 swapper_low_pmd_dir = 0x0000000000402000;
40 . = INITIAL_ADDRESS;
41 .text TEXTSTART :
42 {
43 _text = .;
44 *(.text.head)
45 TEXT_TEXT
46 SCHED_TEXT
47 LOCK_TEXT
48 KPROBES_TEXT
49 *(.gnu.warning)
50 } = 0
51 _etext = .;
52 PROVIDE (etext = .);
53
54 RO_DATA(PAGE_SIZE)
55 .data : {
56 DATA_DATA
57 CONSTRUCTORS
58 }
59 .data1 : {
60 *(.data1)
61 }
62 . = ALIGN(SMP_CACHE_BYTES);
63 .data.cacheline_aligned : {
64 *(.data.cacheline_aligned)
65 }
66 . = ALIGN(SMP_CACHE_BYTES);
67 .data.read_mostly : {
68 *(.data.read_mostly)
69 }
70 /* End of data section */
71 _edata = .;
72 PROVIDE (edata = .);
73
74 /* init_task */
75 . = ALIGN(THREAD_SIZE);
76 .data.init_task : {
77 *(.data.init_task)
78 }
79 .fixup : {
80 __start___fixup = .;
81 *(.fixup)
82 __stop___fixup = .;
83 }
84 . = ALIGN(16);
85 __ex_table : {
86 __start___ex_table = .;
87 *(__ex_table)
88 __stop___ex_table = .;
89 }
90 NOTES
91
92 . = ALIGN(PAGE_SIZE);
93 .init.text : {
94 __init_begin = .;
95 _sinittext = .;
96 INIT_TEXT
97 _einittext = .;
98 }
99 __init_text_end = .;
100 .init.data : {
101 INIT_DATA
102 }
103 . = ALIGN(16);
104 .init.setup : {
105 __setup_start = .;
106 *(.init.setup)
107 __setup_end = .;
108 }
109 .initcall.init : {
110 __initcall_start = .;
111 INITCALLS
112 __initcall_end = .;
113 }
114 .con_initcall.init : {
115 __con_initcall_start = .;
116 *(.con_initcall.init)
117 __con_initcall_end = .;
118 }
119 SECURITY_INIT
120
121 . = ALIGN(4);
122 .tsb_ldquad_phys_patch : {
123 __tsb_ldquad_phys_patch = .;
124 *(.tsb_ldquad_phys_patch)
125 __tsb_ldquad_phys_patch_end = .;
126 }
127
128 .tsb_phys_patch : {
129 __tsb_phys_patch = .;
130 *(.tsb_phys_patch)
131 __tsb_phys_patch_end = .;
132 }
133
134 .cpuid_patch : {
135 __cpuid_patch = .;
136 *(.cpuid_patch)
137 __cpuid_patch_end = .;
138 }
139
140 .sun4v_1insn_patch : {
141 __sun4v_1insn_patch = .;
142 *(.sun4v_1insn_patch)
143 __sun4v_1insn_patch_end = .;
144 }
145 .sun4v_2insn_patch : {
146 __sun4v_2insn_patch = .;
147 *(.sun4v_2insn_patch)
148 __sun4v_2insn_patch_end = .;
149 }
150
151 #ifdef CONFIG_BLK_DEV_INITRD
152 . = ALIGN(PAGE_SIZE);
153 .init.ramfs : {
154 __initramfs_start = .;
155 *(.init.ramfs)
156 __initramfs_end = .;
157 }
158 #endif
159
160 PERCPU(PAGE_SIZE)
161
162 . = ALIGN(PAGE_SIZE);
163 __init_end = .;
164 __bss_start = .;
165 .sbss : {
166 *(.sbss)
167 *(.scommon)
168 }
169 .bss : {
170 *(.dynbss)
171 *(.bss)
172 *(COMMON)
173 }
174 _end = . ;
175 PROVIDE (end = .);
176
177 /DISCARD/ : {
178 EXIT_TEXT
179 EXIT_DATA
180 *(.exitcall.exit)
181 }
182
183 STABS_DEBUG
184 DWARF_DEBUG
185 }
This page took 0.035054 seconds and 6 git commands to generate.