Nicholas Piggin | f188d05 | 2016-11-26 14:26:09 +1100 | [diff] [blame] | 1 | # =========================================================================== |
| 2 | # Post-link powerpc pass |
| 3 | # =========================================================================== |
| 4 | # |
| 5 | # 1. Check that vmlinux relocations look sane |
| 6 | |
| 7 | PHONY := __archpost |
| 8 | __archpost: |
| 9 | |
Horia Geantă | 24e0bfb | 2017-05-08 11:50:16 +0300 | [diff] [blame] | 10 | -include include/config/auto.conf |
Nicholas Piggin | f188d05 | 2016-11-26 14:26:09 +1100 | [diff] [blame] | 11 | include scripts/Kbuild.include |
| 12 | |
Nicholas Piggin | c494ade | 2017-05-12 03:40:39 +1000 | [diff] [blame^] | 13 | quiet_cmd_head_check = CHKHEAD $@ |
| 14 | cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@" |
| 15 | |
Nicholas Piggin | f188d05 | 2016-11-26 14:26:09 +1100 | [diff] [blame] | 16 | quiet_cmd_relocs_check = CHKREL $@ |
Nicholas Piggin | 4ea8065 | 2017-05-12 03:40:38 +1000 | [diff] [blame] | 17 | ifdef 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)" "$@" |
| 21 | else |
| 22 | cmd_relocs_check = \ |
| 23 | $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@" |
| 24 | endif |
Nicholas Piggin | f188d05 | 2016-11-26 14:26:09 +1100 | [diff] [blame] | 25 | |
| 26 | # `@true` prevents complaint when there is nothing to be done |
| 27 | |
| 28 | vmlinux: FORCE |
| 29 | @true |
Nicholas Piggin | c494ade | 2017-05-12 03:40:39 +1000 | [diff] [blame^] | 30 | ifdef CONFIG_PPC64 |
| 31 | $(call cmd,head_check) |
| 32 | endif |
Nicholas Piggin | f188d05 | 2016-11-26 14:26:09 +1100 | [diff] [blame] | 33 | ifdef CONFIG_RELOCATABLE |
| 34 | $(call if_changed,relocs_check) |
| 35 | endif |
| 36 | |
| 37 | %.ko: FORCE |
| 38 | @true |
| 39 | |
| 40 | clean: |
Nicholas Piggin | c494ade | 2017-05-12 03:40:39 +1000 | [diff] [blame^] | 41 | rm -f .tmp_symbols.txt |
Nicholas Piggin | f188d05 | 2016-11-26 14:26:09 +1100 | [diff] [blame] | 42 | |
| 43 | PHONY += FORCE clean |
| 44 | |
| 45 | FORCE: |
| 46 | |
| 47 | .PHONY: $(PHONY) |