summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-04-05 13:33:58 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2022-05-07 20:16:58 +0200
commit7cfa2fcbac167ca0ceadf25a4b600391fd01fb29 (patch)
tree822702d50ecd6ea39da2bec4face8d0e295d6c2c /scripts
parentkbuild: refactor cmd_modversions_c (diff)
downloadlinux-7cfa2fcbac167ca0ceadf25a4b600391fd01fb29.tar.xz
linux-7cfa2fcbac167ca0ceadf25a4b600391fd01fb29.zip
kbuild: refactor cmd_modversions_S
Split the code into two macros, cmd_gen_symversions_S for running genksyms, and cmd_modversions for running $(LD) to update the object with CRCs. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.build15
1 files changed, 4 insertions, 11 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index e1992ddc35f6..f15c245dc17e 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -276,7 +276,8 @@ define rule_as_o_S
$(call cmd_and_fixdep,as_o_S)
$(call cmd,gen_ksymdeps)
$(call cmd,gen_objtooldep)
- $(call cmd,modversions_S)
+ $(call cmd,gen_symversions_S)
+ $(call cmd,modversions)
endef
# Built-in and composite module parts
@@ -363,16 +364,8 @@ ifdef CONFIG_ASM_MODVERSIONS
# versioning matches the C process described above, with difference that
# we parse asm-prototypes.h C header to get function definitions.
-cmd_modversions_S = \
- if $(OBJDUMP) -h $@ | grep -q __ksymtab; then \
- $(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
- > $(@D)/.tmp_$(@F:.o=.ver); \
- \
- $(LD) $(KBUILD_LDFLAGS) -r -o $(@D)/.tmp_$(@F) $@ \
- -T $(@D)/.tmp_$(@F:.o=.ver); \
- mv -f $(@D)/.tmp_$(@F) $@; \
- rm -f $(@D)/.tmp_$(@F:.o=.ver); \
- fi
+cmd_gen_symversions_S = $(call gen_symversions,S)
+
endif
$(obj)/%.o: $(src)/%.S FORCE