diff options
author | Michal Marek <mmarek@suse.cz> | 2010-10-12 09:09:06 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-10-12 09:09:06 -0400 |
commit | 239060b93bb30a4ad55f1ecaa512464a035cc5ba (patch) | |
tree | 77f79810e57d4fc24356eca0cd6db463e8994128 /scripts/mod/file2alias.c | |
parent | 1408b15b98635a13bad2e2a50b3c2ae2ccdf625b (diff) | |
parent | e9203c988234aa512bd45ca32b52e21c7bbfc414 (diff) |
Merge branch 'kbuild/rc-fixes' into kbuild/kconfig
We need to revert the temporary hack in 71ebc01, hence the merge.
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 6 |
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 | ||