Re: [PATCH] Add non-zero module sections to sysfs

From: Sebastian Wankerl
Date: Thu Apr 04 2013 - 05:40:50 EST


On 04/04/13 03:00, Rusty Russell wrote:
> Sebastian Wankerl <sisewank@xxxxxxxxxxxxx> 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.

I don't see why this is wrong. It used to load all sections to sysfs
until the patch mentioned. Actually, it is the PARISC build chain which
is broken.

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

GDB needs to know all sections of the binary and its addresses. It is
generally useful to be able to check up all sections of the binary
regardless if they are empty or not so one can see the binary's
structure. The alternative would be to redo the work by saving the ELF
header in an additional internal data structure that is not exported.
However, this approach is more ugly as it results in code which is
actually redundant.

Thanks,
Sebastian

--
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/