diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2019-12-19 12:51:00 +0100 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2019-12-21 16:25:35 +0100 |
commit | 28f94a44298c99c0db85539874b62f21d94fcaa7 (patch) | |
tree | cd6fbf7499a88942672ffdcc558138f2da223510 /kernel/module.c | |
parent | kconfig: remove ---help--- from documentation (diff) | |
download | linux-28f94a44298c99c0db85539874b62f21d94fcaa7.tar.xz linux-28f94a44298c99c0db85539874b62f21d94fcaa7.zip |
kbuild: clarify the difference between obj-y and obj-m w.r.t. descending
Kbuild descends into a directory by either 'y' or 'm', but there is an
important difference.
Kbuild combines the built-in objects into built-in.a in each directory.
The built-in.a in the directory visited by obj-y is merged into the
built-in.a in the parent directory. This merge happens recursively
when Kbuild is ascending back towards the top directory, then built-in
objects are linked into vmlinux eventually. This works properly only
when the Makefile specifying obj-y is reachable by the chain of obj-y.
On the other hand, Kbuild does not take built-in.a from the directory
visited by obj-m. This it, all the objects in that directory are
supposed to be modular. If Kbuild descends into a directory by obj-m,
but the Makefile in the sub-directory specifies obj-y, those objects
are just left orphan.
The current statement "Kbuild only uses this information to decide that
it needs to visit the directory" is misleading. Clarify the difference.
Reported-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'kernel/module.c')
0 files changed, 0 insertions, 0 deletions