aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2010-06-29 20:08:42 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-08 18:11:38 +1000
commit7fca5dc8aa7aaa6a1023bd3587901b88ebfe8154 (patch)
tree72b9d7e7f89f57cb3be97be19a00e52baf31f4ec /scripts/mod
parent219a92a4c40db2fac604f63bce9a5a3fe1967879 (diff)
downloadkernel_samsung_smdk4412-7fca5dc8aa7aaa6a1023bd3587901b88ebfe8154.tar.gz
kernel_samsung_smdk4412-7fca5dc8aa7aaa6a1023bd3587901b88ebfe8154.tar.bz2
kernel_samsung_smdk4412-7fca5dc8aa7aaa6a1023bd3587901b88ebfe8154.zip
powerpc: Fix module building for gcc 4.5 and 64 bit
Gcc 4.5 is now generating out of line register save and restore in the function prefix and postfix when we use -Os. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/modpost.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index f8779006986..f6127b9f5ac 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -503,6 +503,11 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname)
strncmp(symname, "_rest32gpr_", sizeof("_rest32gpr_") - 1) == 0 ||
strncmp(symname, "_save32gpr_", sizeof("_save32gpr_") - 1) == 0)
return 1;
+ if (info->hdr->e_machine == EM_PPC64)
+ /* Special register function linked on all modules during final link of .ko */
+ if (strncmp(symname, "_restgpr0_", sizeof("_restgpr0_") - 1) == 0 ||
+ strncmp(symname, "_savegpr0_", sizeof("_savegpr0_") - 1) == 0)
+ return 1;
/* Do not ignore this symbol */
return 0;
}