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, modpost: fix unexpected non-allocatable warning with mips
kbuild, modpost: fix "unexpected non-allocatable" warning with SUSE gcc
kbuild, modpost: fix unexpected non-allocatable section when cross compiling

+34 -13
+34 -13
scripts/mod/modpost.c
··· 384 384 return 0; 385 385 } 386 386 /* Fix endianness in ELF header */ 387 - hdr->e_shoff = TO_NATIVE(hdr->e_shoff); 388 - hdr->e_shstrndx = TO_NATIVE(hdr->e_shstrndx); 389 - hdr->e_shnum = TO_NATIVE(hdr->e_shnum); 390 - hdr->e_machine = TO_NATIVE(hdr->e_machine); 391 - hdr->e_type = TO_NATIVE(hdr->e_type); 387 + hdr->e_type = TO_NATIVE(hdr->e_type); 388 + hdr->e_machine = TO_NATIVE(hdr->e_machine); 389 + hdr->e_version = TO_NATIVE(hdr->e_version); 390 + hdr->e_entry = TO_NATIVE(hdr->e_entry); 391 + hdr->e_phoff = TO_NATIVE(hdr->e_phoff); 392 + hdr->e_shoff = TO_NATIVE(hdr->e_shoff); 393 + hdr->e_flags = TO_NATIVE(hdr->e_flags); 394 + hdr->e_ehsize = TO_NATIVE(hdr->e_ehsize); 395 + hdr->e_phentsize = TO_NATIVE(hdr->e_phentsize); 396 + hdr->e_phnum = TO_NATIVE(hdr->e_phnum); 397 + hdr->e_shentsize = TO_NATIVE(hdr->e_shentsize); 398 + hdr->e_shnum = TO_NATIVE(hdr->e_shnum); 399 + hdr->e_shstrndx = TO_NATIVE(hdr->e_shstrndx); 392 400 sechdrs = (void *)hdr + hdr->e_shoff; 393 401 info->sechdrs = sechdrs; 394 402 ··· 410 402 411 403 /* Fix endianness in section headers */ 412 404 for (i = 0; i < hdr->e_shnum; i++) { 413 - sechdrs[i].sh_type = TO_NATIVE(sechdrs[i].sh_type); 414 - sechdrs[i].sh_offset = TO_NATIVE(sechdrs[i].sh_offset); 415 - sechdrs[i].sh_size = TO_NATIVE(sechdrs[i].sh_size); 416 - sechdrs[i].sh_link = TO_NATIVE(sechdrs[i].sh_link); 417 - sechdrs[i].sh_name = TO_NATIVE(sechdrs[i].sh_name); 418 - sechdrs[i].sh_info = TO_NATIVE(sechdrs[i].sh_info); 419 - sechdrs[i].sh_addr = TO_NATIVE(sechdrs[i].sh_addr); 405 + sechdrs[i].sh_name = TO_NATIVE(sechdrs[i].sh_name); 406 + sechdrs[i].sh_type = TO_NATIVE(sechdrs[i].sh_type); 407 + sechdrs[i].sh_flags = TO_NATIVE(sechdrs[i].sh_flags); 408 + sechdrs[i].sh_addr = TO_NATIVE(sechdrs[i].sh_addr); 409 + sechdrs[i].sh_offset = TO_NATIVE(sechdrs[i].sh_offset); 410 + sechdrs[i].sh_size = TO_NATIVE(sechdrs[i].sh_size); 411 + sechdrs[i].sh_link = TO_NATIVE(sechdrs[i].sh_link); 412 + sechdrs[i].sh_info = TO_NATIVE(sechdrs[i].sh_info); 413 + sechdrs[i].sh_addralign = TO_NATIVE(sechdrs[i].sh_addralign); 414 + sechdrs[i].sh_entsize = TO_NATIVE(sechdrs[i].sh_entsize); 420 415 } 421 416 /* Find symbol table. */ 422 417 for (i = 1; i < hdr->e_shnum; i++) { ··· 727 716 728 717 /* sections that we do not want to do full section mismatch check on */ 729 718 static const char *section_white_list[] = 730 - { ".comment", ".debug*", ".stab*", ".note*", ".got*", ".toc*", NULL }; 719 + { 720 + ".comment*", 721 + ".debug*", 722 + ".mdebug*", /* alpha, score, mips etc. */ 723 + ".pdr", /* alpha, score, mips etc. */ 724 + ".stab*", 725 + ".note*", 726 + ".got*", 727 + ".toc*", 728 + NULL 729 + }; 731 730 732 731 /* 733 732 * This is used to find sections missing the SHF_ALLOC flag.