Go to file
Masahiro Yamada d0736af811 kbuild: generate Module.symvers only when vmlinux exists
[ Upstream commit 69bc8d386a ]

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
concatenating vmlinux.symvers and modules-only.symvers if both exist.

Module.symvers is supposed to collect symbols from both vmlinux and
modules. It might be a bit confusing, and I am not quite sure if it
is an official interface, but presumably it is difficult to rename it
because some tools (e.g. kmod) parse it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:12:59 +02:00
Documentation kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
LICENSES
arch powerpc/iommu: Annotate nested lock for lockdep 2021-05-19 10:12:58 +02:00
block
certs
crypto
drivers net: ethernet: mtk_eth_soc: fix RX VLAN offload 2021-05-19 10:12:59 +02:00
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
security
sound
tools selftests: mlxsw: Fix mausezahn invocation in ERSPAN scale test 2021-05-19 10:12:59 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.