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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Franck Bui-Huu <fbuihuu@xxxxxxxxx>
---
 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



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux