From 1a1b64954df11fb4a317001de0ce9e427fbb8dd2 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 25 Feb 2003 03:24:48 -0800 Subject: [PATCH] Fix up kernel/module.c breakage. Bad Rusty! --- kernel/module.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/module.c b/kernel/module.c index 705e3cff7c608..bf6859b3cd738 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1083,6 +1083,9 @@ static struct module *load_module(void *umod, sechdrs = (void *)hdr + hdr->e_shoff; secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; + /* And these should exist, but gcc whinges if we don't init them */ + symindex = strindex = 0; + for (i = 1; i < hdr->e_shnum; i++) { /* Mark all sections sh_addr with their address in the temporary image. */ @@ -1261,6 +1264,7 @@ static struct module *load_module(void *umod, /* Now do relocations. */ for (i = 1; i < hdr->e_shnum; i++) { + const char *strtab = (char *)sechdrs[strindex].sh_addr; if (sechdrs[i].sh_type == SHT_REL) err = apply_relocate(sechdrs, strtab, symindex, i, mod); -- 2.53.0