diff options
Diffstat (limited to 'arch/sparc/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/sparc/kernel/vmlinux.lds.S | 99 |
1 files changed, 79 insertions, 20 deletions
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S index 5b7e69a8c32f..4bfbeffb7320 100644 --- a/arch/sparc/kernel/vmlinux.lds.S +++ b/arch/sparc/kernel/vmlinux.lds.S | |||
@@ -1,27 +1,55 @@ | |||
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 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | 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 | ||
6 | OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc") | 22 | OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc") |
7 | OUTPUT_ARCH(sparc) | 23 | OUTPUT_ARCH(sparc) |
8 | ENTRY(_start) | 24 | ENTRY(_start) |
9 | jiffies = jiffies_64 + 4; | 25 | jiffies = jiffies_64 + 4; |
26 | #else | ||
27 | /* sparc64 */ | ||
28 | OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") | ||
29 | OUTPUT_ARCH(sparc:v9a) | ||
30 | ENTRY(_start) | ||
31 | jiffies = jiffies_64; | ||
32 | #endif | ||
33 | |||
10 | SECTIONS | 34 | SECTIONS |
11 | { | 35 | { |
12 | . = 0x10000 + SIZEOF_HEADERS; | 36 | /* swapper_low_pmd_dir is sparc64 only */ |
13 | .text 0xf0004000 : | 37 | swapper_low_pmd_dir = 0x0000000000402000; |
38 | . = INITIAL_ADDRESS; | ||
39 | .text TEXTSTART : | ||
14 | { | 40 | { |
15 | _text = .; | 41 | _text = .; |
16 | *(.text.head) | 42 | *(.text.head) |
17 | TEXT_TEXT | 43 | TEXT_TEXT |
18 | SCHED_TEXT | 44 | SCHED_TEXT |
19 | LOCK_TEXT | 45 | LOCK_TEXT |
46 | KPROBES_TEXT | ||
20 | *(.gnu.warning) | 47 | *(.gnu.warning) |
21 | } = 0 | 48 | } = 0 |
22 | _etext = .; | 49 | _etext = .; |
23 | PROVIDE (etext = .); | 50 | PROVIDE (etext = .); |
24 | RODATA | 51 | |
52 | RO_DATA(PAGE_SIZE) | ||
25 | .data : { | 53 | .data : { |
26 | DATA_DATA | 54 | DATA_DATA |
27 | CONSTRUCTORS | 55 | CONSTRUCTORS |
@@ -29,25 +57,32 @@ SECTIONS | |||
29 | .data1 : { | 57 | .data1 : { |
30 | *(.data1) | 58 | *(.data1) |
31 | } | 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 = .; | 68 | _edata = .; |
33 | PROVIDE (edata = .); | 69 | PROVIDE (edata = .); |
34 | |||
35 | .fixup : { | 70 | .fixup : { |
36 | __start___fixup = .; | 71 | __start___fixup = .; |
37 | *(.fixup) | 72 | *(.fixup) |
38 | __stop___fixup = .; | 73 | __stop___fixup = .; |
39 | } | 74 | } |
75 | . = ALIGN(16); | ||
40 | __ex_table : { | 76 | __ex_table : { |
41 | __start___ex_table = .; | 77 | __start___ex_table = .; |
42 | *(__ex_table) | 78 | *(__ex_table) |
43 | __stop___ex_table = .; | 79 | __stop___ex_table = .; |
44 | } | 80 | } |
45 | |||
46 | NOTES | 81 | NOTES |
47 | 82 | ||
48 | . = ALIGN(PAGE_SIZE); | 83 | . = ALIGN(PAGE_SIZE); |
49 | __init_begin = .; | ||
50 | .init.text : { | 84 | .init.text : { |
85 | __init_begin = .; | ||
51 | _sinittext = .; | 86 | _sinittext = .; |
52 | INIT_TEXT | 87 | INIT_TEXT |
53 | _einittext = .; | 88 | _einittext = .; |
@@ -65,7 +100,7 @@ SECTIONS | |||
65 | .initcall.init : { | 100 | .initcall.init : { |
66 | __initcall_start = .; | 101 | __initcall_start = .; |
67 | INITCALLS | 102 | INITCALLS |
68 | __initcall_end = .; | 103 | __initcall_end = .; |
69 | } | 104 | } |
70 | .con_initcall.init : { | 105 | .con_initcall.init : { |
71 | __con_initcall_start = .; | 106 | __con_initcall_start = .; |
@@ -74,31 +109,54 @@ SECTIONS | |||
74 | } | 109 | } |
75 | SECURITY_INIT | 110 | SECURITY_INIT |
76 | 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 | 142 | #ifdef CONFIG_BLK_DEV_INITRD |
78 | . = ALIGN(PAGE_SIZE); | 143 | . = ALIGN(PAGE_SIZE); |
79 | .init.ramfs : { | 144 | .init.ramfs : { |
80 | __initramfs_start = .; | 145 | __initramfs_start = .; |
81 | *(.init.ramfs) | 146 | *(.init.ramfs) |
82 | __initramfs_end = .; | 147 | __initramfs_end = .; |
83 | } | 148 | } |
84 | #endif | 149 | #endif |
85 | 150 | ||
86 | PERCPU(PAGE_SIZE) | 151 | PERCPU(PAGE_SIZE) |
152 | |||
87 | . = ALIGN(PAGE_SIZE); | 153 | . = ALIGN(PAGE_SIZE); |
88 | __init_end = .; | 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 = .; | 155 | __bss_start = .; |
99 | .sbss : { | 156 | .sbss : { |
100 | *(.sbss) | 157 | *(.sbss) |
101 | *(.scommon) } | 158 | *(.scommon) |
159 | } | ||
102 | .bss : { | 160 | .bss : { |
103 | *(.dynbss) | 161 | *(.dynbss) |
104 | *(.bss) | 162 | *(.bss) |
@@ -106,6 +164,7 @@ SECTIONS | |||
106 | } | 164 | } |
107 | _end = . ; | 165 | _end = . ; |
108 | PROVIDE (end = .); | 166 | PROVIDE (end = .); |
167 | |||
109 | /DISCARD/ : { | 168 | /DISCARD/ : { |
110 | EXIT_TEXT | 169 | EXIT_TEXT |
111 | EXIT_DATA | 170 | EXIT_DATA |