linux-mips
[Top] [All Lists]

[PATCH 2/4] Add .init.bss section for MIPS

To: linux-mips@linux-mips.org
Subject: [PATCH 2/4] Add .init.bss section for MIPS
From: Franck Bui-Huu <fbuihuu@gmail.com>
Date: Thu, 18 Oct 2007 23:12:31 +0200
Cc: ralf@linux-mips.org, macro@linux-mips.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=j6CZUNFUlYxeJ8VeNMAU+w2QvTdScPurkP9IFGBBBa8=; b=Y3Z4QrFkEXjaCgYKcb7JV9X04Z1aeDrez1eIwP1uPiC58IJYanQjtCuv3TywJq8X79YPMXc3HuH+p8d2Xxn5e8iYgxuj6HstgwjHoSdPx1oDZO/kqG4oJKAbld1LeY6jlmuONUS2kF/baYvpUxjXMYxlVz6XyBDyq9wUipmpdxM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=uHWI0yYKGrtHflvS+uxgkASCWQYplwmOsYgReSTMvDSS66H8HtAOAtHbiLvbhzTsjGneibb9np0V/XjwvJ4qHDHuwx8tzMWQlwAvpuWKb+Dhlu7rZp5p4o36xZzOnJ94MzB7KyexLw9ltlD/GyqT7vxqkwVR9+8z7mdTtYifuIA=
In-reply-to: <1192741953-7040-1-git-send-email-fbuihuu@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1192741953-7040-1-git-send-email-fbuihuu@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 arch/mips/kernel/vmlinux.lds.S |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 84f9a4c..e0a4dc0 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -100,7 +100,7 @@ SECTIONS
        _edata =  .;                    /* End of data section */
 
        /* will be freed after init */
-       . = ALIGN(_PAGE_SIZE);          /* Init code and data */
+       . = ALIGN(_PAGE_SIZE);          /* Init code, data and bss */
        __init_begin = .;
        .init.text : {
                _sinittext = .;
@@ -148,19 +148,27 @@ SECTIONS
        }
 #endif
        PERCPU(_PAGE_SIZE)
-       . = ALIGN(_PAGE_SIZE);
-       __init_end = .;
-       /* freed after init ends here */
 
-       __bss_start = .;        /* BSS */
-       .sbss  : {
-               *(.sbss)
-               *(.scommon)
+       /*
+        * Note that .bss.exit is also discarded at runtime for the
+        * same reason as above.
+        */
+       .bss.exit : {
+               *(.bss.exit)
        }
+       __bss_start = .;        /* BSS */
        .bss : {
+               *(.bss.init)
+               . = ALIGN(_PAGE_SIZE);
+               __init_end = .;         /* freed after init ends here */
+
                *(.bss)
                *(COMMON)
        }
+       .sbss : {
+               *(.sbss)
+               *(.scommon)
+       }
        __bss_stop = .;
 
        _end = . ;
-- 
1.5.3.4


<Prev in Thread] Current Thread [Next in Thread>