lkml.org 
[lkml]   [2013]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Add non-zero module sections to sysfs
Date
Sebastian Wankerl <sisewank@cip.cs.fau.de> writes:
> Add non-zero module sections to sysfs on architectures unequal to PARISC.
> KGDB needs all module sections for proper module debugging. Therefore, commit
> 35dead4235e2b67da7275b4122fed37099c2f462 is revoked except for PARISC
> architecture.

#ifdef CONFIG_PARISC in the middle of kernel/module.c is super-ugly, and
wrong.

My preference would be to fix kgdb. If the section is empty, what need
does it have to examine it?

Thanks,
Rusty.

> Signed-off-by: Sebastian Wankerl <sisewank@cip.cs.fau.de>
> Signed-off-by: Philip Kranz <philip.kranz@googlemail.com>
>
> ---
> kernel/module.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/module.c b/kernel/module.c
> index 3c2c72d..5393a54 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -1316,7 +1316,11 @@ resolve_symbol_wait(struct module *mod,
> #ifdef CONFIG_KALLSYMS
> static inline bool sect_empty(const Elf_Shdr *sect)
> {
> +#if defined(CONFIG_PARISC)
> return !(sect->sh_flags & SHF_ALLOC) || sect->sh_size == 0;
> +#else
> + return !(sect->sh_flags & SHF_ALLOC);
> +#endif
> }
>
> struct module_sect_attr
> --
> 1.7.10.4


\
 
 \ /
  Last update: 2013-04-04 05:21    [W:0.074 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site