Re: [PATCH] also discard .*init sections after module initialization

From: Jan Beulich
Date: Tue Jul 07 2009 - 02:27:23 EST


>>> Tim Abbott <tabbott@xxxxxxxxxxx> 06.07.09 17:55 >>>
>On Wed, 1 Jul 2009, Jan Beulich wrote:
>> Why? .*exit sections deal with device/memory/CPU hot remove, which is
>> orthogonal to module unload.
>
>For the core kernel, the .devinit sections are currently being squashed
>into either the .data section or the .init.data section depending on
>whether hotplug is enabled using the vmlinux linker scripts. Can we use
>the same approach for modules (i.e. have a module linker script that does
>this)? It seems that would avoid having two duplicate mechanisms for
>doing the same thing, one in the module loader and one in the core
>kernel's linker scripts.

I'd have to play with this a little, as I'm not sure ld -r can actually do what
you're suggesting.

Jan

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