• Masahiro Yamada's avatar
    kbuild: generate Module.symvers only when vmlinux exists · d0736af8
    Masahiro Yamada authored
    [ Upstream commit 69bc8d38 ]
    
    The external module build shows the following warning if Module.symvers
    is missing in the kernel tree.
    
      WARNING: Symbol version dump "Module.symvers" is missing.
               Modules may not have dependencies or modversions.
    
    I think this is an important heads-up because the resulting modules may
    not work as expected. This happens when you did not build the entire
    kernel tree, for example, you might have prepared the minimal setups
    for external modules by 'make defconfig && make modules_preapre'.
    
    A problem is that 'make modules' creates Module.symvers even without
    vmlinux. In this case, that warning is suppressed since Module.symvers
    already exists in spite of its incomplete content.
    
    The incomplete (i.e. invalid) Module.symvers should not be created.
    
    This commit changes the second pass of modpost to dump symbols into
    modules-only.symvers. The final Module.symvers is created by
    concaten...
    d0736af8
.gitignore 1.87 KB