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