Difference between revisions of "CELF Project Proposal/Add -ffunction-sections support to Linux kernel"

From eLinux.org
Jump to: navigation, search
m (it's own -> its own)
 
Line 4: Line 4:
  
 
== Description ==
 
== Description ==
"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.
+
"Function sections" is a technique for reducing the size of the kernel image. It does this by placing each function into its 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.  
 
Denys reported that usage of this technique got him about a 10% reduction in kernel size.  

Latest revision as of 22:29, 27 October 2011

Summary 
Add -ffunction-sections support to Linux kernel
Proposer
Tim Bird

Description

"Function sections" is a technique for reducing the size of the kernel image. It does this by placing each function into its 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.

Related work

Scope 
a few weeks

Comments

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.