forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kbuild: re-implement CONFIG_TRIM_UNUSED_KSYMS to make it work in one-…
…pass Commit a555bdd ("Kbuild: enable TRIM_UNUSED_KSYMS again, with some guarding") re-enabled this feature, but Linus is still unhappy about the build time. The reason of the slowness is the recursion - after updating <generated/autoksyms.h> (, which contains all symbols needed by modules), Kbuild begins the second traverse, rebuilding objects whose EXPORT_SYMBOL needs flipping. This commit re-implements CONFIG_TRIM_UNUSED_KSYMS to make it work in one pass. After the tree traverse, a linker script snippet <generated/keep-ksyms.h> is generated. It feeds the list of necessary sections to vmlinus.lds.S and modules.lds.S. The other sections fall into DISCARDS. There is no more build issue, I believe. I dropped the 'if EXPORT' and 'depends on !COMPILE_TEST' guarding. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
- Loading branch information
1 parent
839699e
commit 0149403
Showing
10 changed files
with
103 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.