summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2020-12-11 10:46:20 -0800
committerKees Cook <keescook@chromium.org>2021-01-14 08:21:08 -0800
commit38e89184900385b0dad1ee55c35ae8abcfee6ece (patch)
tree2fceafbc8aaa221c67b16a20908db6bda6a5305d /Makefile
parentdc5723b02e523b2c4a68667f7e28c65018f7202f (diff)
downloadlinux-stable-38e89184900385b0dad1ee55c35ae8abcfee6ece.tar.gz
linux-stable-38e89184900385b0dad1ee55c35ae8abcfee6ece.tar.bz2
linux-stable-38e89184900385b0dad1ee55c35ae8abcfee6ece.zip
kbuild: lto: fix module versioning
With CONFIG_MODVERSIONS, version information is linked into each compilation unit that exports symbols. With LTO, we cannot use this method as all C code is compiled into LLVM bitcode instead. This change collects symbol versions into .symversions files and merges them in link-vmlinux.sh where they are all linked into vmlinux.o at the same time. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20201211184633.3213045-4-samitolvanen@google.com
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2b9bcecd6ea1..173a7c9bd1fb 100644
--- a/Makefile
+++ b/Makefile
@@ -1837,7 +1837,8 @@ clean: $(clean-dirs)
-o -name '.tmp_*.o.*' \
-o -name '*.c.[012]*.*' \
-o -name '*.ll' \
- -o -name '*.gcno' \) -type f -print | xargs rm -f
+ -o -name '*.gcno' \
+ -o -name '*.*.symversions' \) -type f -print | xargs rm -f
# Generate tags for editors
# ---------------------------------------------------------------------------