Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
kbuild: ignore powerpc specific symbols in modpost

+20 -5
+20 -5
scripts/mod/modpost.c
··· 467 467 release_file(info->hdr, info->size); 468 468 } 469 469 470 + static int ignore_undef_symbol(struct elf_info *info, const char *symname) 471 + { 472 + /* ignore __this_module, it will be resolved shortly */ 473 + if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0) 474 + return 1; 475 + /* ignore global offset table */ 476 + if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0) 477 + return 1; 478 + if (info->hdr->e_machine == EM_PPC) 479 + /* Special register function linked on all modules during final link of .ko */ 480 + if (strncmp(symname, "_restgpr_", sizeof("_restgpr_") - 1) == 0 || 481 + strncmp(symname, "_savegpr_", sizeof("_savegpr_") - 1) == 0 || 482 + strncmp(symname, "_rest32gpr_", sizeof("_rest32gpr_") - 1) == 0 || 483 + strncmp(symname, "_save32gpr_", sizeof("_save32gpr_") - 1) == 0) 484 + return 1; 485 + /* Do not ignore this symbol */ 486 + return 0; 487 + } 488 + 470 489 #define CRC_PFX MODULE_SYMBOL_PREFIX "__crc_" 471 490 #define KSYMTAB_PFX MODULE_SYMBOL_PREFIX "__ksymtab_" 472 491 ··· 512 493 if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL && 513 494 ELF_ST_BIND(sym->st_info) != STB_WEAK) 514 495 break; 515 - /* ignore global offset table */ 516 - if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0) 517 - break; 518 - /* ignore __this_module, it will be resolved shortly */ 519 - if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0) 496 + if (ignore_undef_symbol(info, symname)) 520 497 break; 521 498 /* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */ 522 499 #if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)