aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-05 17:10:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-05 17:10:07 -0400
commitda9e82b3b8989fc09e2a4c45b9da604ba2b4c46d (patch)
tree7355d2afe95be27fddb8fa4baa46476c76aeb8ee /scripts/mod/file2alias.c
parent90d3417a3a4e810d67081dd106f0e603a856978f (diff)
parent772320e84588dcbe1600ffb83e5f328f2209ac2a (diff)
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: modpost: support objects with more than 64k sections trivial: fix a typo in a filename frv: clean up arch/frv/Makefile kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line Kbuild: Add option to set -femit-struct-debug-baseonly Makefile: "make kernelrelease" should show the correct full kernel version Makefile.build: make KBUILD_SYMTYPES work again
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r--scripts/mod/file2alias.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 5758aab0d8bb..88f3f07205f8 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -884,16 +884,16 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
884 char *zeros = NULL; 884 char *zeros = NULL;
885 885
886 /* We're looking for a section relative symbol */ 886 /* We're looking for a section relative symbol */
887 if (!sym->st_shndx || sym->st_shndx >= info->hdr->e_shnum) 887 if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections)
888 return; 888 return;
889 889
890 /* Handle all-NULL symbols allocated into .bss */ 890 /* Handle all-NULL symbols allocated into .bss */
891 if (info->sechdrs[sym->st_shndx].sh_type & SHT_NOBITS) { 891 if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) {
892 zeros = calloc(1, sym->st_size); 892 zeros = calloc(1, sym->st_size);
893 symval = zeros; 893 symval = zeros;
894 } else { 894 } else {
895 symval = (void *)info->hdr 895 symval = (void *)info->hdr
896 + info->sechdrs[sym->st_shndx].sh_offset 896 + info->sechdrs[get_secindex(info, sym)].sh_offset
897 + sym->st_value; 897 + sym->st_value;
898 } 898 }
899 899