Linux 4.7 Adds Option To Remove Exported Kernel Symbols That Go Unused
Written by Michael Larabel in Linux Kernel on 26 May 2016 at 07:36 PM EDT. Add A Comment
Normally the Kbuild pull requests for the Linux kernel merge windows tend to not be too noteworthy, but it's a bit different this time around for Linux 4.7.

The Kbuild changes for Linux 4.7 add the new CONFIG_TRIM_UNUSED_KSYMS option. Enabling this option will do a two-pass build where exported kernel symbols not used in that kernel's configuration are then removed/unexported.

With CONFIG_TRIM_UNUSED_KSYMS removing exported kernel symbols that aren't used by a particular kernel build, it's possible to further reduce the size of the generated kernel binary. Additionally, if pushing the kernel through Link Time Optimizations (LTO), removing the unused exported kernel symbols has the potential of offering more savings. It's also possible that removing such unused symbols could help with security aspects too.

This CONFIG_TRIM_UNUSED_KSYMS effort was led by Linaro and will be present in Linux 4.7. The Kbuild 4.7 PR can be found via the kernel mailing list.
Related News
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter or contacted via

Popular News This Week