diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-04-24 21:07:48 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-05-07 20:16:59 +0200 |
commit | 23beb44a0effaad1bd627fd134f0301c622deba7 (patch) | |
tree | 1c2ab00b8b8bebe97cedf5616be8232db118a8af /Makefile | |
parent | modpost: remove stale comment about sym_add_exported() (diff) | |
download | linux-23beb44a0effaad1bd627fd134f0301c622deba7.tar.xz linux-23beb44a0effaad1bd627fd134f0301c622deba7.zip |
modpost: add a separate error for exported symbols without definition
It took me a while to understand the intent of "exp->module == mod".
This code goes back to 2003. [1]
The commit is not in this git repository, and might be worth a little
explanation.
You can add EXPORT_SYMBOL() without having its definition in the same
file (but you need to put a declaration).
This is typical when EXPORT_SYMBOL() is added in a C file, but the
actual implementation is in a separate assembly file.
One example is arch/arm/kernel/armksyms.c
In the old days, EXPORT_SYMBOL() was only available in C files (but
this limitation does not exist any more). If you forget to add the
definition, this error occurs.
Add a separate, clearer message for this case. It should be an error
even if KBUILD_MODPOST_WARN is given.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=2763b6bcb96e6a38a2fe31108fe5759ec5bcc80a
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions