1 From 4e16f08c800d57b986217e0d39d4a06b5bdf641d Mon Sep 17 00:00:00 2001
2 From: Kurt Mahan <kmahan@freescale.com>
3 Date: Wed, 19 Mar 2008 17:37:44 -0600
4 Subject: [PATCH] Move BSS section in linker script and zero it on boot.
6 To work with the latest round of toolchains the bss section
7 in the linker script needed to be moved to the end (due to
8 the linker thinking there were overlapping sections).
10 The BSS section needs to be manually zeroed.
12 LTIBName: mcfv4e-linker-bss-cleanup
13 Signed-off-by: Kurt Mahan <kmahan@freescale.com>
15 arch/m68k/coldfire/head.S | 11 +++++++++++
16 arch/m68k/coldfire/vmlinux-cf.lds | 11 ++++++++---
17 2 files changed, 19 insertions(+), 3 deletions(-)
19 --- a/arch/m68k/coldfire/head.S
20 +++ b/arch/m68k/coldfire/head.S
21 @@ -321,6 +321,17 @@ ENTRY(__start)
25 +#ifdef CONFIG_COLDFIRE
36 /* If you change the memory size to another value make a matching
37 change in paging_init(cf-mmu.c) to zones_size[]. */
39 --- a/arch/m68k/coldfire/vmlinux-cf.lds
40 +++ b/arch/m68k/coldfire/vmlinux-cf.lds
41 @@ -51,9 +51,6 @@ SECTIONS
45 - .bss : AT(ADDR(.bss) - LOAD_OFFSET) { /* BSS */
50 .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET ) {
51 @@ -62,6 +59,8 @@ SECTIONS
53 _edata = .; /* End of data section */
55 + NOTES /* support ld --build-id */
57 . = ALIGN(8192); /* Initrd */
58 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
60 @@ -111,6 +110,12 @@ SECTIONS
61 *(.data.init_task) /* The initial task and kernel stack */
65 + .bss : AT(ADDR(.bss) - LOAD_OFFSET) { /* BSS */
72 /* Sections to be discarded */