Re: module scanning in kgdb 2.x

From: Amit S. Kale
Date: Fri Mar 19 2004 - 10:07:40 EST


On Wednesday 17 Mar 2004 2:48 am, Rusty Russell wrote:
> On Fri, 2004-03-12 at 17:36, Amit S. Kale wrote:
> > Hi,
>
> Hi Amit,
>
> FYI: you would have received a quicker response if you'd CC'd me.

Hi Rusty,

Thanks.
Yep! I'll CC you on any further modules stuff.

>
> > It does following things:
> > 1. Adds MODULE_STATE_GONE to indicate that a module was removed. This is
> > differnent from MODULE_STATE_GOING. gdb needs to be notified of a module
> > event _after_ a module has been removed. Or else it'll still find the
> > module during a module list scan and will not remove it from its core.
>
> Makes sense.
>
> > 2. Defines a structure mod_section which stores module section names and
> > offsets preserved during loading of a module.
> >
> > 3. Adds a couple of fields to struct module to keep module section
> > information.
>
> Why not just set the section strings to SHF_ALLOC rather than copying
> (and possibly truncating) the names into your struct mod_section?
> struct mod_section is then simply void *addr; char *name;

How can I do that? Do I have to use objcopy on module files for this purpose?

-Amit
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/