kbuild: enable objtool for *.mod.o and additional kernel objects

Currently, objtool is disabled in scripts/Makefile.{modfinal,vmlinux}.

This commit moves rule_cc_o_c and rule_as_o_S to scripts/Makefile.lib
and set objtool-enabled to y there.

With this change, *.mod.o, .module-common.o,  builtin-dtb.o, and
vmlinux.export.o will now be covered by objtool.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada
2024-11-14 08:45:22 +09:00
parent 000e22a80d
commit bede169618
4 changed files with 29 additions and 28 deletions

View File

@@ -10,10 +10,10 @@ include $(srctree)/scripts/Makefile.lib
targets :=
%.o: %.c FORCE
$(call if_changed_dep,cc_o_c)
$(call if_changed_rule,cc_o_c)
%.o: %.S FORCE
$(call if_changed_dep,as_o_S)
$(call if_changed_rule,as_o_S)
# Built-in dtb
# ---------------------------------------------------------------------------