Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 # ===========================================================================
0003 # Post-link powerpc pass
0004 # ===========================================================================
0005 #
0006 # 1. Check that vmlinux relocations look sane
0007 
0008 PHONY := __archpost
0009 __archpost:
0010 
0011 -include include/config/auto.conf
0012 include scripts/Kbuild.include
0013 
0014 quiet_cmd_head_check = CHKHEAD $@
0015       cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"
0016 
0017 quiet_cmd_relocs_check = CHKREL  $@
0018 ifdef CONFIG_PPC_BOOK3S_64
0019       cmd_relocs_check =                                                \
0020         $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@" ; \
0021         $(BASH) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$(NM)" "$@"
0022 else
0023       cmd_relocs_check =                                                \
0024         $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@"
0025 endif
0026 
0027 # `@true` prevents complaint when there is nothing to be done
0028 
0029 vmlinux: FORCE
0030         @true
0031 ifdef CONFIG_PPC64
0032         $(call cmd,head_check)
0033 endif
0034 ifdef CONFIG_RELOCATABLE
0035         $(call if_changed,relocs_check)
0036 endif
0037 
0038 %.ko: FORCE
0039         @true
0040 
0041 clean:
0042         rm -f .tmp_symbols.txt
0043 
0044 PHONY += FORCE clean
0045 
0046 FORCE:
0047 
0048 .PHONY: $(PHONY)