Skip to content
Snippets Groups Projects
Forked from Alex Deucher / linux
86605 commits behind the upstream repository.
  • Masahiro Yamada's avatar
    a8390ba9
    kbuild: remove stale *.symversions · a8390ba9
    Masahiro Yamada authored
    
    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: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    a8390ba9
    History
    kbuild: remove stale *.symversions
    Masahiro Yamada authored
    
    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: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>