LWN.net Logo

Link-time optimization for the kernel

Link-time optimization for the kernel

Posted Aug 24, 2012 15:01 UTC (Fri) by jezuch (subscriber, #52988)
Parent article: Link-time optimization for the kernel

> But it turns out that most of the changes have the same basic scope: ensuring that the compiler knows that specific symbols are needed even if they appear to be unused; that prevents the LTO stage from optimizing them away. For example, symbols exported to modules may not have any callers in the core kernel itself, but they need to be preserved for modules that may be loaded later. To that end, Andi's first patch defines a new attribute (__visible) used to mark such symbols

One more thing... If I disable loadable modules (CONFIG_MODULES=n), does this also get disabled? I think I have nothing to fear from the symbol reaper if there's no way to use these symbols outside the core kernel :)


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds