diff options
Diffstat (limited to 'arch/mips/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/mips/kernel/vmlinux.lds.S | 114 |
1 files changed, 22 insertions, 92 deletions
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 58738c8d754f..2769bed3d2af 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <asm/asm-offsets.h> | 1 | #include <asm/asm-offsets.h> |
2 | #include <asm/page.h> | ||
2 | #include <asm-generic/vmlinux.lds.h> | 3 | #include <asm-generic/vmlinux.lds.h> |
3 | 4 | ||
4 | #undef mips | 5 | #undef mips |
@@ -42,13 +43,7 @@ SECTIONS | |||
42 | } :text = 0 | 43 | } :text = 0 |
43 | _etext = .; /* End of text section */ | 44 | _etext = .; /* End of text section */ |
44 | 45 | ||
45 | /* Exception table */ | 46 | EXCEPTION_TABLE(16) |
46 | . = ALIGN(16); | ||
47 | __ex_table : { | ||
48 | __start___ex_table = .; | ||
49 | *(__ex_table) | ||
50 | __stop___ex_table = .; | ||
51 | } | ||
52 | 47 | ||
53 | /* Exception table for data bus errors */ | 48 | /* Exception table for data bus errors */ |
54 | __dbe_table : { | 49 | __dbe_table : { |
@@ -65,20 +60,10 @@ SECTIONS | |||
65 | /* writeable */ | 60 | /* writeable */ |
66 | .data : { /* Data */ | 61 | .data : { /* Data */ |
67 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ | 62 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ |
68 | /* | ||
69 | * This ALIGN is needed as a workaround for a bug a | ||
70 | * gcc bug upto 4.1 which limits the maximum alignment | ||
71 | * to at most 32kB and results in the following | ||
72 | * warning: | ||
73 | * | ||
74 | * CC arch/mips/kernel/init_task.o | ||
75 | * arch/mips/kernel/init_task.c:30: warning: alignment | ||
76 | * of ‘init_thread_union’ is greater than maximum | ||
77 | * object file alignment. Using 32768 | ||
78 | */ | ||
79 | . = ALIGN(_PAGE_SIZE); | ||
80 | *(.data.init_task) | ||
81 | 63 | ||
64 | INIT_TASK_DATA(PAGE_SIZE) | ||
65 | NOSAVE_DATA | ||
66 | CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) | ||
82 | DATA_DATA | 67 | DATA_DATA |
83 | CONSTRUCTORS | 68 | CONSTRUCTORS |
84 | } | 69 | } |
@@ -95,51 +80,13 @@ SECTIONS | |||
95 | .sdata : { | 80 | .sdata : { |
96 | *(.sdata) | 81 | *(.sdata) |
97 | } | 82 | } |
98 | |||
99 | . = ALIGN(_PAGE_SIZE); | ||
100 | .data_nosave : { | ||
101 | __nosave_begin = .; | ||
102 | *(.data.nosave) | ||
103 | } | ||
104 | . = ALIGN(_PAGE_SIZE); | ||
105 | __nosave_end = .; | ||
106 | |||
107 | . = ALIGN(1 << CONFIG_MIPS_L1_CACHE_SHIFT); | ||
108 | .data.cacheline_aligned : { | ||
109 | *(.data.cacheline_aligned) | ||
110 | } | ||
111 | _edata = .; /* End of data section */ | 83 | _edata = .; /* End of data section */ |
112 | 84 | ||
113 | /* will be freed after init */ | 85 | /* will be freed after init */ |
114 | . = ALIGN(_PAGE_SIZE); /* Init code and data */ | 86 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
115 | __init_begin = .; | 87 | __init_begin = .; |
116 | .init.text : { | 88 | INIT_TEXT_SECTION(PAGE_SIZE) |
117 | _sinittext = .; | 89 | INIT_DATA_SECTION(16) |
118 | INIT_TEXT | ||
119 | _einittext = .; | ||
120 | } | ||
121 | .init.data : { | ||
122 | INIT_DATA | ||
123 | } | ||
124 | . = ALIGN(16); | ||
125 | .init.setup : { | ||
126 | __setup_start = .; | ||
127 | *(.init.setup) | ||
128 | __setup_end = .; | ||
129 | } | ||
130 | |||
131 | .initcall.init : { | ||
132 | __initcall_start = .; | ||
133 | INITCALLS | ||
134 | __initcall_end = .; | ||
135 | } | ||
136 | |||
137 | .con_initcall.init : { | ||
138 | __con_initcall_start = .; | ||
139 | *(.con_initcall.init) | ||
140 | __con_initcall_end = .; | ||
141 | } | ||
142 | SECURITY_INIT | ||
143 | 90 | ||
144 | /* .exit.text is discarded at runtime, not link time, to deal with | 91 | /* .exit.text is discarded at runtime, not link time, to deal with |
145 | * references from .rodata | 92 | * references from .rodata |
@@ -150,43 +97,16 @@ SECTIONS | |||
150 | .exit.data : { | 97 | .exit.data : { |
151 | EXIT_DATA | 98 | EXIT_DATA |
152 | } | 99 | } |
153 | #if defined(CONFIG_BLK_DEV_INITRD) | 100 | |
154 | . = ALIGN(_PAGE_SIZE); | 101 | PERCPU(PAGE_SIZE) |
155 | .init.ramfs : { | 102 | . = ALIGN(PAGE_SIZE); |
156 | __initramfs_start = .; | ||
157 | *(.init.ramfs) | ||
158 | __initramfs_end = .; | ||
159 | } | ||
160 | #endif | ||
161 | PERCPU(_PAGE_SIZE) | ||
162 | . = ALIGN(_PAGE_SIZE); | ||
163 | __init_end = .; | 103 | __init_end = .; |
164 | /* freed after init ends here */ | 104 | /* freed after init ends here */ |
165 | 105 | ||
166 | __bss_start = .; /* BSS */ | 106 | BSS_SECTION(0, 0, 0) |
167 | .sbss : { | ||
168 | *(.sbss) | ||
169 | *(.scommon) | ||
170 | } | ||
171 | .bss : { | ||
172 | *(.bss) | ||
173 | *(COMMON) | ||
174 | } | ||
175 | __bss_stop = .; | ||
176 | 107 | ||
177 | _end = . ; | 108 | _end = . ; |
178 | 109 | ||
179 | /* Sections to be discarded */ | ||
180 | /DISCARD/ : { | ||
181 | *(.exitcall.exit) | ||
182 | |||
183 | /* ABI crap starts here */ | ||
184 | *(.MIPS.options) | ||
185 | *(.options) | ||
186 | *(.pdr) | ||
187 | *(.reginfo) | ||
188 | } | ||
189 | |||
190 | /* These mark the ABI of the kernel for debuggers. */ | 110 | /* These mark the ABI of the kernel for debuggers. */ |
191 | .mdebug.abi32 : { | 111 | .mdebug.abi32 : { |
192 | KEEP(*(.mdebug.abi32)) | 112 | KEEP(*(.mdebug.abi32)) |
@@ -212,4 +132,14 @@ SECTIONS | |||
212 | *(.gptab.bss) | 132 | *(.gptab.bss) |
213 | *(.gptab.sbss) | 133 | *(.gptab.sbss) |
214 | } | 134 | } |
135 | |||
136 | /* Sections to be discarded */ | ||
137 | DISCARDS | ||
138 | /DISCARD/ : { | ||
139 | /* ABI crap starts here */ | ||
140 | *(.MIPS.options) | ||
141 | *(.options) | ||
142 | *(.pdr) | ||
143 | *(.reginfo) | ||
144 | } | ||
215 | } | 145 | } |