summaryrefslogtreecommitdiff
path: root/scripts/Makefile.vmlinux_o
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2025-11-20 12:14:20 -0800
committerPeter Zijlstra <peterz@infradead.org>2025-11-21 10:04:10 +0100
commit93863f3f859a626347ce2ec18947b11357b4ca14 (patch)
tree9fe324f0bd90059b763d4bb51353896520c79fb8 /scripts/Makefile.vmlinux_o
parent31863337138a0482d614f1090727dac87c936959 (diff)
downloadlwn-93863f3f859a626347ce2ec18947b11357b4ca14.tar.gz
lwn-93863f3f859a626347ce2ec18947b11357b4ca14.zip
kbuild: Check for functions with ambiguous -ffunction-sections section names
Commit 9c7dc1dd897a ("objtool: Warn on functions with ambiguous -ffunction-sections section names") only works for drivers which are compiled on architectures supported by objtool. Make a script to perform the same check for all architectures. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/a6a49644a34964f7e02f3a8ce43af03e72817180.1763669451.git.jpoimboe@kernel.org
Diffstat (limited to 'scripts/Makefile.vmlinux_o')
-rw-r--r--scripts/Makefile.vmlinux_o4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o
index 20533cc0b1ee..527352c222ff 100644
--- a/scripts/Makefile.vmlinux_o
+++ b/scripts/Makefile.vmlinux_o
@@ -63,11 +63,15 @@ quiet_cmd_ld_vmlinux.o = LD $@
--start-group $(KBUILD_VMLINUX_LIBS) --end-group \
$(cmd_objtool)
+cmd_check_function_names = $(srctree)/scripts/check-function-names.sh $@
+
define rule_ld_vmlinux.o
$(call cmd_and_savecmd,ld_vmlinux.o)
$(call cmd,gen_objtooldep)
+ $(call cmd,check_function_names)
endef
+
vmlinux.o: $(initcalls-lds) vmlinux.a $(KBUILD_VMLINUX_LIBS) FORCE
$(call if_changed_rule,ld_vmlinux.o)