modpost: track if the symbol origin is a dump file or ELF object
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 1 Jun 2020 05:57:05 +0000 (14:57 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 6 Jun 2020 14:36:55 +0000 (23:36 +0900)
commit52c3416db00d970c91a6992ab6e5ff48e077ad29
tree8eef0a668baa0753233e5cc6732cf0d90e169fca
parent2beee868997485a5718a349c7868260d5ee7378f
modpost: track if the symbol origin is a dump file or ELF object

The meaning of sym->kernel is obscure; it is set for in-kernel symbols
loaded from Modules.symvers. This happens only when we are building
external modules, and it is used to determine whether to dump symbols
to $(KBUILD_EXTMOD)/Modules.symvers

It is clearer to remember whether the symbol or module came from a dump
file or ELF object.

This changes the KBUILD_EXTRA_SYMBOLS behavior. Previously, symbols
loaded from KBUILD_EXTRA_SYMBOLS are accumulated into the current
$(KBUILD_EXTMOD)/Modules.symvers

Going forward, they will be only used to check symbol references, but
not dumped into the current $(KBUILD_EXTMOD)/Modules.symvers. I believe
this makes more sense.

sym->vmlinux will have no user. Remove it too.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/mod/modpost.c
scripts/mod/modpost.h