From patchwork Thu Jan 27 14:37:09 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: 512511 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 p0REbKxJ007713 for ; Thu, 27 Jan 2011 14:37:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753214Ab1A0OhT (ORCPT ); Thu, 27 Jan 2011 09:37:19 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:35305 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753141Ab1A0OhS (ORCPT ); Thu, 27 Jan 2011 09:37:18 -0500 Received: by wyb28 with SMTP id 28so2141260wyb.19 for ; Thu, 27 Jan 2011 06:37:17 -0800 (PST) Received: by 10.227.152.129 with SMTP id g1mr1116096wbw.203.1296139037531; Thu, 27 Jan 2011 06:37:17 -0800 (PST) Received: from arm.com (host86-147-190-25.range86-147.btcentralplus.com [86.147.190.25]) by mx.google.com with ESMTPS id o6sm197972wbo.21.2011.01.27.06.37.16 (version=SSLv3 cipher=RC4-MD5); Thu, 27 Jan 2011 06:37:17 -0800 (PST) Date: Thu, 27 Jan 2011 14:37:09 +0000 From: Dave Martin To: Nicolas Pitre Cc: Russell King - ARM Linux , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] ARM: Avoid discarding sections that might have SMP_ON_UP fixups SMP_ON_UP fixups Message-ID: <20110127143709.GA13735@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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]); Thu, 27 Jan 2011 14:37:20 +0000 (UTC) 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 */