CELF Project Proposal/Add -ffunction-sections support to Linux kernel
- Add -ffunctio-sections support to Linux kernel
- Tim Bird
"Function sections" is a technique for reducing the size of the kernel image. It does this by placing each function into it's own linker section, which then allows the linker to do better dead code removal.
Denys reported that usage of this technique got him about a 10% reduction in kernel size.
- a few weeks
Patches for this were submitted by Denys Vlasenko, but were not mainlined.
Tim Abbot writes:
There's actually been substantial progress since then -- in the thread Denys referenced, Sam Ravnborg suggested we go about things differently, first cleaning up all the references to these sections to use standard macros, and then renaming the sections. The last of my patches for this cleanup was merged into mainline a few days ago.
In a month or so, I'm planning to start sending RFCs for a much simpler patch series targeted at the 2.6.34 merge window that will enable building the kernel with -ffunction-sections -fdata-sections; I expect that the new patch series will have much less difficulty being merged.