1f188d052SNicholas Piggin# ===========================================================================
2f188d052SNicholas Piggin# Post-link powerpc pass
3f188d052SNicholas Piggin# ===========================================================================
4f188d052SNicholas Piggin#
5f188d052SNicholas Piggin# 1. Check that vmlinux relocations look sane
6f188d052SNicholas Piggin
7f188d052SNicholas PigginPHONY := __archpost
8f188d052SNicholas Piggin__archpost:
9f188d052SNicholas Piggin
1024e0bfbfSHoria Geantă-include include/config/auto.conf
11f188d052SNicholas Piggininclude scripts/Kbuild.include
12f188d052SNicholas Piggin
13f188d052SNicholas Pigginquiet_cmd_relocs_check = CHKREL  $@
144ea80652SNicholas Pigginifdef CONFIG_PPC_BOOK3S_64
154ea80652SNicholas Piggin      cmd_relocs_check =						\
164ea80652SNicholas Piggin	$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@" ; \
174ea80652SNicholas Piggin	$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$@"
184ea80652SNicholas Pigginelse
194ea80652SNicholas Piggin      cmd_relocs_check =						\
204ea80652SNicholas Piggin	$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@"
214ea80652SNicholas Pigginendif
22f188d052SNicholas Piggin
23f188d052SNicholas Piggin# `@true` prevents complaint when there is nothing to be done
24f188d052SNicholas Piggin
25f188d052SNicholas Pigginvmlinux: FORCE
26f188d052SNicholas Piggin	@true
27f188d052SNicholas Pigginifdef CONFIG_RELOCATABLE
28f188d052SNicholas Piggin	$(call if_changed,relocs_check)
29f188d052SNicholas Pigginendif
30f188d052SNicholas Piggin
31f188d052SNicholas Piggin%.ko: FORCE
32f188d052SNicholas Piggin	@true
33f188d052SNicholas Piggin
34f188d052SNicholas Pigginclean:
35f188d052SNicholas Piggin	@true
36f188d052SNicholas Piggin
37f188d052SNicholas PigginPHONY += FORCE clean
38f188d052SNicholas Piggin
39f188d052SNicholas PigginFORCE:
40f188d052SNicholas Piggin
41f188d052SNicholas Piggin.PHONY: $(PHONY)
42