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