diff mbox

ARM: Avoid discarding sections that might have SMP_ON_UP fixups

Message ID 20110126172535.GA15983@arm.com (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

tip-bot for Dave Martin Jan. 26, 2011, 5:25 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 45b5651..473e30e 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -85,6 +85,7 @@  SECTIONS
 	 * unwind exit sections must be discarded before the rest of the
 	 * unwind sections get included.
 	 */
+#ifndef CONFIG_SMP_ON_UP
 	/DISCARD/ : {
 		*(.ARM.exidx.exit.text)
 		*(.ARM.extab.exit.text)
@@ -99,6 +100,7 @@  SECTIONS
 		*(__ex_table)
 #endif
 	}
+#endif
 
 	.text : {			/* Real text segment		*/
 		_text = .;		/* Text and read-only data	*/
@@ -107,6 +109,12 @@  SECTIONS
 			__exception_text_end = .;
 			IRQENTRY_TEXT
 			TEXT_TEXT
+#ifdef CONFIG_SMP_ON_UP
+			*(.exit.text)
+			CPU_KEEP(exit.text)
+			DEV_KEEP(exit.text)
+			MEM_KEEP(exit.text)
+#endif
 			SCHED_TEXT
 			LOCK_TEXT
 			KPROBES_TEXT
@@ -116,6 +124,11 @@  SECTIONS
 			*(.gnu.warning)
 			*(.rodata)
 			*(.rodata.*)
+#ifdef CONFIG_SMP_ON_UP
+			CPU_KEEP(exit.rodata)
+			DEV_KEEP(exit.rodata)
+			MEM_KEEP(exit.rodata)
+#endif
 			*(.glue_7)
 			*(.glue_7t)
 		. = ALIGN(4);
@@ -188,6 +201,11 @@  SECTIONS
 		 * and the usual data section
 		 */
 		DATA_DATA
+#ifdef CONFIG_SMP_ON_UP
+		DEV_KEEP(exit.data)
+		CPU_KEEP(exit.data)
+		MEM_KEEP(exit.data)
+#endif
 		CONSTRUCTORS
 
 		_edata = .;