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