2016-11-26 11:26:09 +08:00
|
|
|
# ===========================================================================
|
|
|
|
# Post-link powerpc pass
|
|
|
|
# ===========================================================================
|
|
|
|
#
|
|
|
|
# 1. Check that vmlinux relocations look sane
|
|
|
|
|
|
|
|
PHONY := __archpost
|
|
|
|
__archpost:
|
|
|
|
|
2017-05-08 16:50:16 +08:00
|
|
|
-include include/config/auto.conf
|
2016-11-26 11:26:09 +08:00
|
|
|
include scripts/Kbuild.include
|
|
|
|
|
2017-05-12 01:40:39 +08:00
|
|
|
quiet_cmd_head_check = CHKHEAD $@
|
|
|
|
cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"
|
|
|
|
|
2016-11-26 11:26:09 +08:00
|
|
|
quiet_cmd_relocs_check = CHKREL $@
|
2017-05-12 01:40:38 +08:00
|
|
|
ifdef CONFIG_PPC_BOOK3S_64
|
|
|
|
cmd_relocs_check = \
|
|
|
|
$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@" ; \
|
|
|
|
$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$@"
|
|
|
|
else
|
|
|
|
cmd_relocs_check = \
|
|
|
|
$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@"
|
|
|
|
endif
|
2016-11-26 11:26:09 +08:00
|
|
|
|
|
|
|
# `@true` prevents complaint when there is nothing to be done
|
|
|
|
|
|
|
|
vmlinux: FORCE
|
|
|
|
@true
|
2017-05-12 01:40:39 +08:00
|
|
|
ifdef CONFIG_PPC64
|
|
|
|
$(call cmd,head_check)
|
|
|
|
endif
|
2016-11-26 11:26:09 +08:00
|
|
|
ifdef CONFIG_RELOCATABLE
|
|
|
|
$(call if_changed,relocs_check)
|
|
|
|
endif
|
|
|
|
|
|
|
|
%.ko: FORCE
|
|
|
|
@true
|
|
|
|
|
|
|
|
clean:
|
2017-05-12 01:40:39 +08:00
|
|
|
rm -f .tmp_symbols.txt
|
2016-11-26 11:26:09 +08:00
|
|
|
|
|
|
|
PHONY += FORCE clean
|
|
|
|
|
|
|
|
FORCE:
|
|
|
|
|
|
|
|
.PHONY: $(PHONY)
|