* [PATCH] module: Fix up CONFIG_KALLSYMS=n build.
@ 2009-09-25 3:45 Paul Mundt
2009-09-25 6:42 ` Jan Beulich
2009-09-25 6:49 ` Américo Wang
0 siblings, 2 replies; 6+ messages in thread
From: Paul Mundt @ 2009-09-25 3:45 UTC (permalink / raw)
To: Jan Beulich, Rusty Russell; +Cc: Andrew Morton, linux-kernel
Starting from commit 4a4962263f07d14660849ec134ee42b63e95ea9a
"reduce symbol table for loaded modules (v2)", the kernel/module.c build
is broken with CONFIG_KALLSYMS disabled.
CC kernel/module.o
kernel/module.c:1995: warning: type defaults to 'int' in declaration of 'Elf_Hdr'
kernel/module.c:1995: error: expected ';', ',' or ')' before '*' token
kernel/module.c: In function 'load_module':
kernel/module.c:2203: error: 'strmap' undeclared (first use in this function)
kernel/module.c:2203: error: (Each undeclared identifier is reported only once
kernel/module.c:2203: error: for each function it appears in.)
kernel/module.c:2239: error: 'symoffs' undeclared (first use in this function)
kernel/module.c:2239: error: implicit declaration of function 'layout_symtab'
kernel/module.c:2240: error: 'stroffs' undeclared (first use in this function)
make[1]: *** [kernel/module.o] Error 1
make: *** [kernel/module.o] Error 2
There are three different issues:
- layout_symtab() takes a const Elf_Ehdr
- layout_symtab() needs to return a value
- symoffs/stroffs/strmap are referenced by the load_module() code
despite being ifdefed out, which seems unnecessary given the noop
behaviour of layout_symtab()/add_kallsyms() in the case of
CONFIG_KALLSYMS=n.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
---
kernel/module.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index 5a29397..4e84c64 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1992,12 +1992,14 @@ static inline unsigned long layout_symtab(struct module *mod,
Elf_Shdr *sechdrs,
unsigned int symindex,
unsigned int strindex,
- const Elf_Hdr *hdr,
+ const Elf_Ehdr *hdr,
const char *secstrings,
unsigned long *pstroffs,
unsigned long *strmap)
{
+ return 0;
}
+
static inline void add_kallsyms(struct module *mod,
Elf_Shdr *sechdrs,
unsigned int shnum,
@@ -2081,9 +2083,8 @@ static noinline struct module *load_module(void __user *umod,
struct module *mod;
long err = 0;
void *percpu = NULL, *ptr = NULL; /* Stops spurious gcc warning */
-#ifdef CONFIG_KALLSYMS
unsigned long symoffs, stroffs, *strmap;
-#endif
+
mm_segment_t old_fs;
DEBUGP("load_module: umod=%p, len=%lu, uargs=%p\n",
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] module: Fix up CONFIG_KALLSYMS=n build.
2009-09-25 3:45 [PATCH] module: Fix up CONFIG_KALLSYMS=n build Paul Mundt
@ 2009-09-25 6:42 ` Jan Beulich
2009-09-25 6:49 ` Américo Wang
1 sibling, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2009-09-25 6:42 UTC (permalink / raw)
To: Paul Mundt; +Cc: Andrew Morton, Rusty Russell, linux-kernel
>>> Paul Mundt <lethal@linux-sh.org> 25.09.09 05:45 >>>
>There are three different issues:
>
> - layout_symtab() takes a const Elf_Ehdr
>
> - layout_symtab() needs to return a value
>
> - symoffs/stroffs/strmap are referenced by the load_module() code
> despite being ifdefed out, which seems unnecessary given the noop
> behaviour of layout_symtab()/add_kallsyms() in the case of
> CONFIG_KALLSYMS=n.
>
>Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Oh, sorry for not having checked that. Thanks, and
Acked-by: Jan Beulich <jbeulich@novell.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] module: Fix up CONFIG_KALLSYMS=n build.
2009-09-25 3:45 [PATCH] module: Fix up CONFIG_KALLSYMS=n build Paul Mundt
2009-09-25 6:42 ` Jan Beulich
@ 2009-09-25 6:49 ` Américo Wang
2009-09-25 7:54 ` Rusty Russell
1 sibling, 1 reply; 6+ messages in thread
From: Américo Wang @ 2009-09-25 6:49 UTC (permalink / raw)
To: Paul Mundt, Jan Beulich, Rusty Russell, Andrew Morton,
linux-kernel
On Fri, Sep 25, 2009 at 11:45 AM, Paul Mundt <lethal@linux-sh.org> wrote:
> Starting from commit 4a4962263f07d14660849ec134ee42b63e95ea9a
> "reduce symbol table for loaded modules (v2)", the kernel/module.c build
> is broken with CONFIG_KALLSYMS disabled.
>
> CC kernel/module.o
> kernel/module.c:1995: warning: type defaults to 'int' in declaration of 'Elf_Hdr'
> kernel/module.c:1995: error: expected ';', ',' or ')' before '*' token
> kernel/module.c: In function 'load_module':
> kernel/module.c:2203: error: 'strmap' undeclared (first use in this function)
> kernel/module.c:2203: error: (Each undeclared identifier is reported only once
> kernel/module.c:2203: error: for each function it appears in.)
> kernel/module.c:2239: error: 'symoffs' undeclared (first use in this function)
> kernel/module.c:2239: error: implicit declaration of function 'layout_symtab'
> kernel/module.c:2240: error: 'stroffs' undeclared (first use in this function)
> make[1]: *** [kernel/module.o] Error 1
> make: *** [kernel/module.o] Error 2
>
> There are three different issues:
>
> - layout_symtab() takes a const Elf_Ehdr
>
> - layout_symtab() needs to return a value
>
> - symoffs/stroffs/strmap are referenced by the load_module() code
> despite being ifdefed out, which seems unnecessary given the noop
> behaviour of layout_symtab()/add_kallsyms() in the case of
> CONFIG_KALLSYMS=n.
>
> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
> Cc: Jan Beulich <jbeulich@novell.com>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
Indeed.
Acked-by: WANG Cong <amwang@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] module: Fix up CONFIG_KALLSYMS=n build.
2009-09-25 6:49 ` Américo Wang
@ 2009-09-25 7:54 ` Rusty Russell
2009-09-25 8:14 ` Sam Ravnborg
0 siblings, 1 reply; 6+ messages in thread
From: Rusty Russell @ 2009-09-25 7:54 UTC (permalink / raw)
To: Américo Wang; +Cc: Paul Mundt, Jan Beulich, Andrew Morton, linux-kernel
On Fri, 25 Sep 2009 04:19:22 pm Américo Wang wrote:
> On Fri, Sep 25, 2009 at 11:45 AM, Paul Mundt <lethal@linux-sh.org> wrote:
> > Starting from commit 4a4962263f07d14660849ec134ee42b63e95ea9a
> > "reduce symbol table for loaded modules (v2)", the kernel/module.c build
> > is broken with CONFIG_KALLSYMS disabled.
> >
> > CC kernel/module.o
> > kernel/module.c:1995: warning: type defaults to 'int' in declaration of 'Elf_Hdr'
> > kernel/module.c:1995: error: expected ';', ',' or ')' before '*' token
> > kernel/module.c: In function 'load_module':
> > kernel/module.c:2203: error: 'strmap' undeclared (first use in this function)
> > kernel/module.c:2203: error: (Each undeclared identifier is reported only once
> > kernel/module.c:2203: error: for each function it appears in.)
> > kernel/module.c:2239: error: 'symoffs' undeclared (first use in this function)
> > kernel/module.c:2239: error: implicit declaration of function 'layout_symtab'
> > kernel/module.c:2240: error: 'stroffs' undeclared (first use in this function)
> > make[1]: *** [kernel/module.o] Error 1
> > make: *** [kernel/module.o] Error 2
> >
> > There are three different issues:
> >
> > - layout_symtab() takes a const Elf_Ehdr
> >
> > - layout_symtab() needs to return a value
> >
> > - symoffs/stroffs/strmap are referenced by the load_module() code
> > despite being ifdefed out, which seems unnecessary given the noop
> > behaviour of layout_symtab()/add_kallsyms() in the case of
> > CONFIG_KALLSYMS=n.
> >
> > Signed-off-by: Paul Mundt <lethal@linux-sh.org>
> > Cc: Jan Beulich <jbeulich@novell.com>
> > Cc: Rusty Russell <rusty@rustcorp.com.au>
>
> Indeed.
>
> Acked-by: WANG Cong <amwang@redhat.com>
And this completes the set:
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Thanks Paul!
Cheers,
Rusty.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] module: Fix up CONFIG_KALLSYMS=n build.
2009-09-25 7:54 ` Rusty Russell
@ 2009-09-25 8:14 ` Sam Ravnborg
2009-09-27 7:03 ` Rusty Russell
0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2009-09-25 8:14 UTC (permalink / raw)
To: Rusty Russell
Cc: Am?rico Wang, Paul Mundt, Jan Beulich, Andrew Morton,
linux-kernel
On Fri, Sep 25, 2009 at 05:24:20PM +0930, Rusty Russell wrote:
> On Fri, 25 Sep 2009 04:19:22 pm Américo Wang wrote:
> > On Fri, Sep 25, 2009 at 11:45 AM, Paul Mundt <lethal@linux-sh.org> wrote:
> > > Starting from commit 4a4962263f07d14660849ec134ee42b63e95ea9a
> > > "reduce symbol table for loaded modules (v2)", the kernel/module.c build
> > > is broken with CONFIG_KALLSYMS disabled.
> > >
> > > CC kernel/module.o
> > > kernel/module.c:1995: warning: type defaults to 'int' in declaration of 'Elf_Hdr'
> > > kernel/module.c:1995: error: expected ';', ',' or ')' before '*' token
> > > kernel/module.c: In function 'load_module':
> > > kernel/module.c:2203: error: 'strmap' undeclared (first use in this function)
> > > kernel/module.c:2203: error: (Each undeclared identifier is reported only once
> > > kernel/module.c:2203: error: for each function it appears in.)
> > > kernel/module.c:2239: error: 'symoffs' undeclared (first use in this function)
> > > kernel/module.c:2239: error: implicit declaration of function 'layout_symtab'
> > > kernel/module.c:2240: error: 'stroffs' undeclared (first use in this function)
> > > make[1]: *** [kernel/module.o] Error 1
> > > make: *** [kernel/module.o] Error 2
> > >
> > > There are three different issues:
> > >
> > > - layout_symtab() takes a const Elf_Ehdr
> > >
> > > - layout_symtab() needs to return a value
> > >
> > > - symoffs/stroffs/strmap are referenced by the load_module() code
> > > despite being ifdefed out, which seems unnecessary given the noop
> > > behaviour of layout_symtab()/add_kallsyms() in the case of
> > > CONFIG_KALLSYMS=n.
> > >
> > > Signed-off-by: Paul Mundt <lethal@linux-sh.org>
> > > Cc: Jan Beulich <jbeulich@novell.com>
> > > Cc: Rusty Russell <rusty@rustcorp.com.au>
> >
> > Indeed.
> >
> > Acked-by: WANG Cong <amwang@redhat.com>
>
> And this completes the set:
>
> Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Hmm, I expected you to take this patch and forward to Linus?
In which case I had expected to see a "S-o-b".
Sam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] module: Fix up CONFIG_KALLSYMS=n build.
2009-09-25 8:14 ` Sam Ravnborg
@ 2009-09-27 7:03 ` Rusty Russell
0 siblings, 0 replies; 6+ messages in thread
From: Rusty Russell @ 2009-09-27 7:03 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Am?rico Wang, Paul Mundt, Jan Beulich, Andrew Morton,
linux-kernel
On Fri, 25 Sep 2009 05:44:03 pm Sam Ravnborg wrote:
> On Fri, Sep 25, 2009 at 05:24:20PM +0930, Rusty Russell wrote:
> > Acked-by: Rusty Russell <rusty@rustcorp.com.au>
>
> Hmm, I expected you to take this patch and forward to Linus?
> In which case I had expected to see a "S-o-b".
Andrew already took it, and I'd already pushed my modules patches. Seemed
like the fastest way to get this in?
Cheers,
Rusty.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-09-27 7:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-25 3:45 [PATCH] module: Fix up CONFIG_KALLSYMS=n build Paul Mundt
2009-09-25 6:42 ` Jan Beulich
2009-09-25 6:49 ` Américo Wang
2009-09-25 7:54 ` Rusty Russell
2009-09-25 8:14 ` Sam Ravnborg
2009-09-27 7:03 ` Rusty Russell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.