blob: 5db43ebbe2dfdc9e0197e558bad4917816cc5232 [file] [log] [blame]
Nicholas Pigginf188d052016-11-26 14:26:09 +11001# ===========================================================================
2# Post-link powerpc pass
3# ===========================================================================
4#
5# 1. Check that vmlinux relocations look sane
6
7PHONY := __archpost
8__archpost:
9
Horia Geantă24e0bfb2017-05-08 11:50:16 +030010-include include/config/auto.conf
Nicholas Pigginf188d052016-11-26 14:26:09 +110011include scripts/Kbuild.include
12
Nicholas Pigginc494ade2017-05-12 03:40:39 +100013quiet_cmd_head_check = CHKHEAD $@
14 cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"
15
Nicholas Pigginf188d052016-11-26 14:26:09 +110016quiet_cmd_relocs_check = CHKREL $@
Nicholas Piggin4ea80652017-05-12 03:40:38 +100017ifdef CONFIG_PPC_BOOK3S_64
18 cmd_relocs_check = \
19 $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@" ; \
20 $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$@"
21else
22 cmd_relocs_check = \
23 $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@"
24endif
Nicholas Pigginf188d052016-11-26 14:26:09 +110025
26# `@true` prevents complaint when there is nothing to be done
27
28vmlinux: FORCE
29 @true
Nicholas Pigginc494ade2017-05-12 03:40:39 +100030ifdef CONFIG_PPC64
31 $(call cmd,head_check)
32endif
Nicholas Pigginf188d052016-11-26 14:26:09 +110033ifdef CONFIG_RELOCATABLE
34 $(call if_changed,relocs_check)
35endif
36
37%.ko: FORCE
38 @true
39
40clean:
Nicholas Pigginc494ade2017-05-12 03:40:39 +100041 rm -f .tmp_symbols.txt
Nicholas Pigginf188d052016-11-26 14:26:09 +110042
43PHONY += FORCE clean
44
45FORCE:
46
47.PHONY: $(PHONY)