On Thu, 11 Oct 2007, Franck Bui-Huu wrote: > and the kernel image is bigger after the patch is applied ! > > $ ls -l vmlinux* > -rwxrwxr-x 1 fbuihuu fbuihuu 2503324 2007-10-11 11:41 vmlinux* > -rwxrwxr-x 1 fbuihuu fbuihuu 2503264 2007-10-11 11:41 vmlinux~old* > > Could anybody explain me why ? The time is missing and I probably > couldn't investigate into this until this weekend. I guess for a bss-type section you want to use something like: .section .init.bss,"aw",@nobits > Also not that with the current patchset applied, there are now 2 > segments that need to be loaded, hopefully it won't cause any issues > with any bootloaders out there that would assume that an image has > only one segment... Well, there should be no need for an extra segment -- just rearrange the order of the sections in the linker script appropriately. You should probably add __exitbss for consistency too. You can make all the three sections adjacent so that no separate initialisation is required. Another place for optimisation are inline string literals referred to from .init.text or .exit.text only, which is a bit more complicated to handle, but sounds interesting enough to me I shall give it a try in the next few days. I have an idea how to do it. Maciej