diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-03-28 23:34:14 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-03-28 23:34:14 +0100 |
| commit | 38a6ed3ed8e108b662f4016a1ebf068dcf4c1ef4 (patch) | |
| tree | a83d5e4e86edf6cb2de22db6f2ff2274753a2bab /scripts/mod/modpost.c | |
| parent | f2d28a2ebcb525a6ec7e2152106ddb385ef52b73 (diff) | |
| parent | 7c730ccdc1188b97f5c8cb690906242c7ed75c22 (diff) | |
| download | olio-linux-3.10-38a6ed3ed8e108b662f4016a1ebf068dcf4c1ef4.tar.xz olio-linux-3.10-38a6ed3ed8e108b662f4016a1ebf068dcf4c1ef4.zip | |
Merge branch 'linus' into core/printk
Diffstat (limited to 'scripts/mod/modpost.c')
| -rw-r--r-- | scripts/mod/modpost.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 88921611b22..7e62303133d 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -415,8 +415,9 @@ static int parse_elf(struct elf_info *info, const char *filename) const char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; const char *secname; + int nobits = sechdrs[i].sh_type == SHT_NOBITS; - if (sechdrs[i].sh_offset > info->size) { + if (!nobits && sechdrs[i].sh_offset > info->size) { fatal("%s is truncated. sechdrs[i].sh_offset=%lu > " "sizeof(*hrd)=%zu\n", filename, (unsigned long)sechdrs[i].sh_offset, @@ -425,6 +426,8 @@ static int parse_elf(struct elf_info *info, const char *filename) } secname = secstrings + sechdrs[i].sh_name; if (strcmp(secname, ".modinfo") == 0) { + if (nobits) + fatal("%s has NOBITS .modinfo\n", filename); info->modinfo = (void *)hdr + sechdrs[i].sh_offset; info->modinfo_len = sechdrs[i].sh_size; } else if (strcmp(secname, "__ksymtab") == 0) |