aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2017-08-29 16:33:57 -0400
committerNicolas Pitre <nicolas.pitre@linaro.org>2017-09-10 19:34:52 -0400
commit861e37da6a06c867b51528066cad84c0fb90cc0c (patch)
treec35a624a1ec38a6bcb6cead49134024c4fc83cf3 /arch/arm/kernel
parent88cac29f42b107fe340a4b8c255bcc3a0cc2f858 (diff)
ARM: vmlinux.lds.S: replace open coded .data sections with generic macros
Our .data section is missing PAGE_ALIGNED_DATA() which contains, amongst other things, the vdso page. This creates a System.map that looks like this: c15769a8 D _edata c1577000 d vdso_data_store c1578000 D __start___bug_table c1580544 D __stop___bug_table c1580544 B __bss_start By using RW_DATA_SECTION() we pick whatever generic sections might be added in the future and have page-aligned data next to other strongly aligned data. Furthermore we now include the entire thing, including the bug table, in the data accounting surrounded by _sdata/_edata. While at it let's also remplace the open coded .init.data by its equivalent INIT_DATA_SECTION(). Signed-off-by: Nicolas Pitre <nico@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Chris Brandt <Chris.Brandt@renesas.com>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/vmlinux.lds.S38
1 files changed, 6 insertions, 32 deletions
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 4f86b4b7bdcc..f73ba564b5e5 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -214,14 +214,9 @@ SECTIONS
214 *(.pv_table) 214 *(.pv_table)
215 __pv_table_end = .; 215 __pv_table_end = .;
216 } 216 }
217 .init.data : { 217
218 INIT_DATA 218 INIT_DATA_SECTION(16)
219 INIT_SETUP(16) 219
220 INIT_CALLS
221 CON_INITCALL
222 SECURITY_INITCALL
223 INIT_RAM_FS
224 }
225 .exit.data : { 220 .exit.data : {
226 ARM_EXIT_KEEP(EXIT_DATA) 221 ARM_EXIT_KEEP(EXIT_DATA)
227 } 222 }
@@ -237,30 +232,9 @@ SECTIONS
237#endif 232#endif
238 __init_end = .; 233 __init_end = .;
239 234
240 .data : { 235 _sdata = .;
241 _data = .; /* address in memory */ 236 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
242 _sdata = .; 237 _edata = .;
243
244 /*
245 * first, the init task union, aligned
246 * to an 8192 byte boundary.
247 */
248 INIT_TASK_DATA(THREAD_SIZE)
249
250 NOSAVE_DATA
251 CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
252 READ_MOSTLY_DATA(L1_CACHE_BYTES)
253
254 /*
255 * and the usual data section
256 */
257 DATA_DATA
258 CONSTRUCTORS
259
260 _edata = .;
261 }
262
263 BUG_TABLE
264 238
265#ifdef CONFIG_HAVE_TCM 239#ifdef CONFIG_HAVE_TCM
266 /* 240 /*