From patchwork Wed Jan 26 17:25:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot for Dave Martin X-Patchwork-Id: 509261 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0QHPmZ9002863 for ; Wed, 26 Jan 2011 17:25:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753849Ab1AZRZq (ORCPT ); Wed, 26 Jan 2011 12:25:46 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:58105 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753669Ab1AZRZp (ORCPT ); Wed, 26 Jan 2011 12:25:45 -0500 Received: by wyb28 with SMTP id 28so1161520wyb.19 for ; Wed, 26 Jan 2011 09:25:44 -0800 (PST) Received: by 10.227.153.1 with SMTP id i1mr2623494wbw.97.1296062744507; Wed, 26 Jan 2011 09:25:44 -0800 (PST) Received: from arm.com (host86-160-167-253.range86-160.btcentralplus.com [86.160.167.253]) by mx.google.com with ESMTPS id m13sm11107894wbz.3.2011.01.26.09.25.43 (version=SSLv3 cipher=RC4-MD5); Wed, 26 Jan 2011 09:25:44 -0800 (PST) Date: Wed, 26 Jan 2011 17:25:35 +0000 From: "Dave P. Martin" To: Russell King - ARM Linux Cc: Dave Martin , Nicolas Pitre , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: Avoid discarding sections that might have SMP_ON_UP fixups Message-ID: <20110126172535.GA15983@arm.com> References: <20110117192050.GE23331@n2100.arm.linux.org.uk> <20110125165919.GD17286@n2100.arm.linux.org.uk> <20110125174636.GE17286@n2100.arm.linux.org.uk> <20110126124452.GB4232@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110126124452.GB4232@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 26 Jan 2011 17:25:48 +0000 (UTC) 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 = .;