]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - scripts/mod/modpost.c
powerpc: Fix module building for gcc 4.5 and 64 bit
[net-next-2.6.git] / scripts / mod / modpost.c
index f8779006986d16a2e39341a7aa66ebf7b8825162..f6127b9f5acac16c10842fee3c53445fddfacd2a 100644 (file)
@@ -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;
 }