aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2012-07-05 17:09:40 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-07-11 00:19:59 -0400
commit1d5a436d2ce9d1b65c905f69a33e78d69245993e (patch)
tree6a9609e6213ae60fc3f5e62ab2b6046bea1d8089
parent18ad51dd342a7eb09dbcd059d0b451b616d4dafc (diff)
powerpc: Put the gpr save/restore functions in their own section
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 <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/lib/crtsavres.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/lib/crtsavres.S b/arch/powerpc/lib/crtsavres.S
index 1c893f05d224..b2c68ce139ae 100644
--- a/arch/powerpc/lib/crtsavres.S
+++ b/arch/powerpc/lib/crtsavres.S
@@ -41,12 +41,13 @@
41#include <asm/ppc_asm.h> 41#include <asm/ppc_asm.h>
42 42
43 .file "crtsavres.S" 43 .file "crtsavres.S"
44 .section ".text"
45 44
46#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 45#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
47 46
48#ifndef CONFIG_PPC64 47#ifndef CONFIG_PPC64
49 48
49 .section ".text"
50
50/* Routines for saving integer registers, called by the compiler. */ 51/* Routines for saving integer registers, called by the compiler. */
51/* Called with r11 pointing to the stack header word of the caller of the */ 52/* Called with r11 pointing to the stack header word of the caller of the */
52/* function, just beyond the end of the integer save area. */ 53/* function, just beyond the end of the integer save area. */
@@ -232,6 +233,8 @@ _GLOBAL(_rest32gpr_31_x)
232 233
233#else /* CONFIG_PPC64 */ 234#else /* CONFIG_PPC64 */
234 235
236 .section ".text.save.restore","ax",@progbits
237
235.globl _savegpr0_14 238.globl _savegpr0_14
236_savegpr0_14: 239_savegpr0_14:
237 std r14,-144(r1) 240 std r14,-144(r1)