Conflicts: arch/parisc/kernel/irq.c arch/x86/include/asm/fixmap_64.h arch/x86/include/asm/setup.h kernel/irq/handle.c Semantic merge: arch/x86/include/asm/fixmap.h
Showing the changes to scripts/mod (1 of 465 files). Show all
Unified · Split
| @@ -415,8 +415,9 @@ static int parse_elf(struct elf_info *info, const char *filename) · 414 unmodified lines | ||
| 415 | 415 | const char *secstrings |
| 416 | 416 | = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; |
| 417 | 417 | const char *secname; |
| 418 | + int nobits = sechdrs[i].sh_type == SHT_NOBITS; | |
| 418 | 419 | |
| 419 | − if (sechdrs[i].sh_offset > info->size) { | |
| 420 | + if (!nobits && sechdrs[i].sh_offset > info->size) { | |
| 420 | 421 | fatal("%s is truncated. sechdrs[i].sh_offset=%lu > " |
| 421 | 422 | "sizeof(*hrd)=%zu\n", filename, |
| 422 | 423 | (unsigned long)sechdrs[i].sh_offset, |
| @@ -425,6 +426,8 @@ static int parse_elf(struct elf_info *info, const char *filename) · 2 unmodified lines | ||
| 425 | 426 | } |
| 426 | 427 | secname = secstrings + sechdrs[i].sh_name; |
| 427 | 428 | if (strcmp(secname, ".modinfo") == 0) { |
| 429 | + if (nobits) | |
| 430 | + fatal("%s has NOBITS .modinfo\n", filename); | |
| 428 | 431 | info->modinfo = (void *)hdr + sechdrs[i].sh_offset; |
| 429 | 432 | info->modinfo_len = sechdrs[i].sh_size; |
| 430 | 433 | } else if (strcmp(secname, "__ksymtab") == 0) |