[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <201007181703.17022.vda.linux@googlemail.com>
Date: Sun, 18 Jul 2010 17:03:16 +0200
From: Denys Vlasenko <vda.linux@...glemail.com>
To: Tim Abbott <tabbott@...lice.com>, Tim Bird <tim.bird@...sony.com>
Cc: James Bottomley <James.Bottomley@...senpartnership.com>,
linux-kernel@...r.kernel.org,
Matt Fleming <matt@...sole-pimps.org>,
linux-arch@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Sam Ravnborg <sam@...nborg.org>, Michal Marek <mmarek@...e.cz>,
Denys Vlasenko <vda.linux@...glemail.com>,
Parisc List <linux-parisc@...r.kernel.org>
Subject: Testing of function/data-sections on linux-2.6.35-rc4
Hi Tim, Tim, folks,
Update on -ffunction-sections status:
I re-tested linux-2.6.35-rc4 today.
Most of work needed for -ffunction-sections -fdata-sections
is already in this kernel. This mail explains what is
still missing.
In order to have a working kernel with this make invocation:
make KCFLAGS="-ffunction-sections -fdata-sections"
linux-2.6.35-rc4 needs three patches:
* modpost fix for 64k+ sections: linux-2.6.35-rc4-fs.modpost.patch
This patch is in -mm, it still not reach mainline...
* fix for kernel linker stripts: linux-2.6.35-rc4-fs.fix-kernel-linker-scripts.patch
It makes _all_ linker scripts -ffunction/data-sections safe via:
- *(.data)
+ *(.data .data.*)
* fix for module linker script: linux-2.6.35-rc4-fs.fix-ko-module-linker-script.patch
Prevents kernel modules from having unnecessarily many
sections and thus prevents module size growth.
Then, in order to also garbage-collect the sections, I added
LDFLAGS_vmlinux += --gc-sections
in top-level Makefile.
This requires the additional patch (linux-2.6.35-rc4-fsgs.patch)
which adds KEEP(section) directives to kernel linker stripts.
Otherwise, linker will discard some crucial sections.
All four patches are attached.
I am sending this email from the machine which runs the kernel
built with -ffunction-sections -fdata-sections --gc-sections.
--
vda
View attachment "linux-2.6.35-rc4-fs.modpost.patch" of type "text/x-diff" (9268 bytes)
View attachment "linux-2.6.35-rc4-fs.fix-kernel-linker-scripts.patch" of type "text/x-diff" (13646 bytes)
View attachment "linux-2.6.35-rc4-fs.fix-ko-module-linker-script.patch" of type "text/x-diff" (1213 bytes)
View attachment "linux-2.6.35-rc4-fsgs.patch" of type "text/x-diff" (15581 bytes)
Powered by blists - more mailing lists