summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorakpm@osdl.org <akpm@osdl.org>2006-02-22 12:19:54 +0100
committerSam Ravnborg <sam@mars.ravnborg.org>2006-02-22 20:23:51 +0100
commitfededcd2af6219de69b252b7d3ea4b4ec2f33c7a (patch)
treea9efa5e71fec3c0a385e8429686d0be9d7d0a153 /scripts
parentkbuild: fix a cscope bug (make cscope segfaults) (diff)
downloadlinux-fededcd2af6219de69b252b7d3ea4b4ec2f33c7a.tar.xz
linux-fededcd2af6219de69b252b7d3ea4b4ec2f33c7a.zip
kbuild: fix modpost compile with older gcc
The kernel now requires that CC be 3.1.0 or higher. But we shouldn't place that requirement upon HOSTCC unless we really need to. Fixes my ia64 problem. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/modpost.c6
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,
/* 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;