Messages in this thread | | | Date | Thu, 04 Apr 2013 11:40:15 +0200 | From | Sebastian Wankerl <> | Subject | Re: [PATCH] Add non-zero module sections to sysfs |
| |
On 04/04/13 03:00, Rusty Russell wrote: > 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.
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
| |