From 43bcfafa9d8dd9f702954e1539ccaad68cd1ec04 Mon Sep 17 00:00:00 2001 From: "akpm@osdl.org" Date: Wed, 22 Feb 2006 03:19:54 -0800 Subject: [PATCH] --- yaml --- r: 23714 b: refs/heads/master c: fededcd2af6219de69b252b7d3ea4b4ec2f33c7a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/mod/modpost.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 9f26bf9581b7..ab2fbfacc112 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f558c333445a0181f33f9e6f996ce7cf008206a +refs/heads/master: fededcd2af6219de69b252b7d3ea4b4ec2f33c7a diff --git a/trunk/scripts/mod/modpost.c b/trunk/scripts/mod/modpost.c index 844f84b0818a..5b076ef51996 100644 --- a/trunk/scripts/mod/modpost.c +++ b/trunk/scripts/mod/modpost.c @@ -590,14 +590,14 @@ static void check_sec_ref(struct module *mod, const char *modname, /* Walk through all sections */ for (i = 0; i < hdr->e_shnum; i++) { + Elf_Rela *rela; + Elf_Rela *start = (void *)hdr + sechdrs[i].sh_offset; + Elf_Rela *stop = (void*)start + sechdrs[i].sh_size; const char *name = secstrings + sechdrs[i].sh_name + strlen(".rela"); /* We want to process only relocation sections and not .init */ if (section_ref_ok(name) || (sechdrs[i].sh_type != SHT_RELA)) continue; - Elf_Rela *rela; - Elf_Rela *start = (void *)hdr + sechdrs[i].sh_offset; - Elf_Rela *stop = (void*)start + sechdrs[i].sh_size; for (rela = start; rela < stop; rela++) { Elf_Rela r;