diff options
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r-- | scripts/mod/modpost.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 844f84b0818a..5b076ef51996 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -590,14 +590,14 @@ static void check_sec_ref(struct module *mod, const char *modname, | |||
590 | 590 | ||
591 | /* Walk through all sections */ | 591 | /* Walk through all sections */ |
592 | for (i = 0; i < hdr->e_shnum; i++) { | 592 | for (i = 0; i < hdr->e_shnum; i++) { |
593 | Elf_Rela *rela; | ||
594 | Elf_Rela *start = (void *)hdr + sechdrs[i].sh_offset; | ||
595 | Elf_Rela *stop = (void*)start + sechdrs[i].sh_size; | ||
593 | const char *name = secstrings + sechdrs[i].sh_name + | 596 | const char *name = secstrings + sechdrs[i].sh_name + |
594 | strlen(".rela"); | 597 | strlen(".rela"); |
595 | /* We want to process only relocation sections and not .init */ | 598 | /* We want to process only relocation sections and not .init */ |
596 | if (section_ref_ok(name) || (sechdrs[i].sh_type != SHT_RELA)) | 599 | if (section_ref_ok(name) || (sechdrs[i].sh_type != SHT_RELA)) |
597 | continue; | 600 | continue; |
598 | Elf_Rela *rela; | ||
599 | Elf_Rela *start = (void *)hdr + sechdrs[i].sh_offset; | ||
600 | Elf_Rela *stop = (void*)start + sechdrs[i].sh_size; | ||
601 | 601 | ||
602 | for (rela = start; rela < stop; rela++) { | 602 | for (rela = start; rela < stop; rela++) { |
603 | Elf_Rela r; | 603 | Elf_Rela r; |