From patchwork Fri Jul 6 07:09:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 169351 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 56F782C03D8 for ; Fri, 6 Jul 2012 17:10:19 +1000 (EST) Received: from members.tip.net.au (haggis.tip.net.au [IPv6:2402:b800:7003:1::20]) by ozlabs.org (Postfix) with ESMTP id D4C972C0080 for ; Fri, 6 Jul 2012 17:09:46 +1000 (EST) Received: from canb.auug.org.au (ibmaus65.lnk.telstra.net [165.228.126.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by members.tip.net.au (Postfix) with ESMTPSA id AA30E1640E1; Fri, 6 Jul 2012 17:09:45 +1000 (EST) Date: Fri, 6 Jul 2012 17:09:40 +1000 From: Stephen Rothwell To: Benjamin Herrenschmidt Subject: [PATCH] powerpc: put the gpr sabe/restore functions in their own section Message-Id: <20120706170940.e3457b04a58ddd18d963c14a@canb.auug.org.au> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.10; i486-pc-linux-gnu) Mime-Version: 1.0 Cc: ppc-dev , Alan Modra X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This allows the linker to know that calls to them do not need to switch TOC and stop errors like the following when linking large configurations: powerpc64-linux-ld: drivers/built-in.o: In function `.gpiochip_is_requested': (.text+0x4): sibling call optimization to `_savegpr0_29' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `_savegpr0_29' extern Signed-off-by: Stephen Rothwell --- arch/powerpc/lib/crtsavres.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/lib/crtsavres.S b/arch/powerpc/lib/crtsavres.S index 1c893f0..b2c68ce 100644 --- a/arch/powerpc/lib/crtsavres.S +++ b/arch/powerpc/lib/crtsavres.S @@ -41,12 +41,13 @@ #include .file "crtsavres.S" - .section ".text" #ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE #ifndef CONFIG_PPC64 + .section ".text" + /* Routines for saving integer registers, called by the compiler. */ /* Called with r11 pointing to the stack header word of the caller of the */ /* function, just beyond the end of the integer save area. */ @@ -232,6 +233,8 @@ _GLOBAL(_rest32gpr_31_x) #else /* CONFIG_PPC64 */ + .section ".text.save.restore","ax",@progbits + .globl _savegpr0_14 _savegpr0_14: std r14,-144(r1)