diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-13 09:49:38 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-13 09:49:38 +0100 |
commit | b1864e9a1afef41709886072c6e6248def0386f4 (patch) | |
tree | 2fe749209cf860c1dd10efd1bd2ad8df572bd66e /scripts/mod/modpost.c | |
parent | e9c4ffb11f0b19005b5b9dc8481687a3637e5887 (diff) | |
parent | 7032e8696726354d6180d8a2d17191f958cd93ae (diff) |
Merge branch 'x86/core' into perfcounters/core
Conflicts:
arch/x86/Kconfig
arch/x86/kernel/apic.c
arch/x86/kernel/setup_percpu.c
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 88921611b22e..7e62303133dc 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) |