]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: fix UNUSED_KSYMS_WHITELIST for Clang LTO
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 26 Feb 2021 06:25:48 +0000 (15:25 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 28 Feb 2021 06:19:21 +0000 (15:19 +0900)
commit339cd89be3e37afa40d941da9ef8785b83005a0d
tree12339f936fba7c5c2c152ce3dcd0dd427cfaeee4
parent5b4b2e9d3682c24d067d854af4458177ff10ea03
kbuild: fix UNUSED_KSYMS_WHITELIST for Clang LTO

Commit 445019eb0762 ("kbuild: lto: add a default list of used symbols")
does not work as expected if the .config file has already specified
CONFIG_UNUSED_KSYMS_WHITELIST="my/own/white/list" before enabling
CONFIG_LTO_CLANG.

So, the user-supplied whitelist and LTO-specific white list must be
independent of each other.

I refactored the shell script so CONFIG_MODVERSIONS and CONFIG_CLANG_LTO
handle whitelists in the same way.

Fixes: 445019eb0762 ("kbuild: lto: add a default list of used symbols")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
init/Kconfig
scripts/gen_autoksyms.sh
scripts/lto-used-symbollist.txt [deleted file]