diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-08-19 03:57:36 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-09-03 02:17:20 +0300 |
commit | a8390ba9ddce15242a41ca04d097b75fd54fd63f (patch) | |
tree | ef5a3965b046be545e5a3b24101b08d978b0d847 /scripts/link-vmlinux.sh | |
parent | f01ac2a15218f3282b0b09b7ef7f314cbd7dd2b3 (diff) | |
download | linux-a8390ba9ddce15242a41ca04d097b75fd54fd63f.tar.xz |
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>
Diffstat (limited to 'scripts/link-vmlinux.sh')
0 files changed, 0 insertions, 0 deletions