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.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -276,7 +276,8 @@ define rule_as_o_S · 275 unmodified lines | ||
| 276 | 276 | $(call cmd_and_fixdep,as_o_S) |
| 277 | 277 | $(call cmd,gen_ksymdeps) |
| 278 | 278 | $(call cmd,gen_objtooldep) |
| 279 | − $(call cmd,modversions_S) | |
| 279 | + $(call cmd,gen_symversions_S) | |
| 280 | + $(call cmd,modversions) | |
| 280 | 281 | endef |
| 281 | 282 | |
| 282 | 283 | # Built-in and composite module parts |
| @@ -363,16 +364,8 @@ ifdef CONFIG_ASM_MODVERSIONS · 80 unmodified lines | ||
| 363 | 364 | # versioning matches the C process described above, with difference that |
| 364 | 365 | # we parse asm-prototypes.h C header to get function definitions. |
| 365 | 366 | |
| 366 | −cmd_modversions_S = \ | |
| 367 | − if $(OBJDUMP) -h $@ | grep -q __ksymtab; then \ | |
| 368 | − $(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ | |
| 369 | − > $(@D)/.tmp_$(@F:.o=.ver); \ | |
| 370 | − \ | |
| 371 | − $(LD) $(KBUILD_LDFLAGS) -r -o $(@D)/.tmp_$(@F) $@ \ | |
| 372 | − -T $(@D)/.tmp_$(@F:.o=.ver); \ | |
| 373 | − mv -f $(@D)/.tmp_$(@F) $@; \ | |
| 374 | − rm -f $(@D)/.tmp_$(@F:.o=.ver); \ | |
| 375 | − fi | |
| 367 | +cmd_gen_symversions_S = $(call gen_symversions,S) | |
| 368 | + | |
| 376 | 369 | endif |
| 377 | 370 | |
| 378 | 371 | $(obj)/%.o: $(src)/%.S FORCE |