diff mbox

[v2] ARM: Avoid discarding sections that might have SMP_ON_UP fixups SMP_ON_UP fixups

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

Commit Message

tip-bot for Dave Martin Jan. 27, 2011, 2:37 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..5774b95 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -43,6 +43,17 @@  SECTIONS
 		_sinittext = .;
 			HEAD_TEXT
 			INIT_TEXT
+#ifdef CONFIG_SMP_ON_UP
+			*(.exit.text)
+			CPU_KEEP(exit.text)
+			DEV_KEEP(exit.text)
+			MEM_KEEP(exit.text)
+#endif
+#ifdef CONFIG_SMP_ON_UP
+			CPU_KEEP(exit.rodata)
+			DEV_KEEP(exit.rodata)
+			MEM_KEEP(exit.rodata)
+#endif
 		_einittext = .;
 		ARM_CPU_DISCARD(PROC_INFO)
 		__arch_info_begin = .;
@@ -72,6 +83,11 @@  SECTIONS
 		__init_begin = _stext;
 		INIT_DATA
 #endif
+#ifdef CONFIG_SMP_ON_UP
+		DEV_KEEP(exit.data)
+		CPU_KEEP(exit.data)
+		MEM_KEEP(exit.data)
+#endif
 	}
 
 	PERCPU(PAGE_SIZE)
@@ -85,6 +101,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 +116,7 @@  SECTIONS
 		*(__ex_table)
 #endif
 	}
+#endif
 
 	.text : {			/* Real text segment		*/
 		_text = .;		/* Text and read-only data	*/