]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kbuild: remove stale *.symversions
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 19 Aug 2021 00:57:36 +0000 (09:57 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Fri, 27 Aug 2021 05:05:53 +0000 (14:05 +0900)
commitb1ec6c234aeda8531ccea689e023b77cc23967a8
tree564679b02ee0a7c22bb581166902bdde81b133f3
parentc176a8773d78addf8d84b36290efe70bc48265a7
kbuild: remove stale *.symversions

cmd_update_lto_symversions merges all the existing *.symversions, but
some of them might be stale.

If the last EXPORT_SYMBOL is removed from a C file, the *.symversions
file is not deleted or updated. It contains stale CRCs, but still they
will be used for linking the vmlinux or modules.

It is not a big deal when the EXPORT_SYMBOL is really removed. However,
when the EXPORT_SYMBOL is moved to another file, the same __crc_<symbol>
will appear twice in the merged *.symversions, possibly with different
CRCs if the function argument is changed at the same time. It would
confuse module versioning.

If no EXPORT_SYMBOL is found, let's remove *.symversions explicitly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
scripts/Makefile.build