1# SPDX-License-Identifier: GPL-2.0 2# =========================================================================== 3# Post-link riscv pass 4# =========================================================================== 5# 6# Check that vmlinux relocations look sane 7 8PHONY := __archpost 9__archpost: 10 11-include include/config/auto.conf 12include $(srctree)/scripts/Kbuild.include 13 14quiet_cmd_relocs_check = CHKREL $@ 15cmd_relocs_check = \ 16 $(CONFIG_SHELL) $(srctree)/arch/riscv/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@" 17 18# `@true` prevents complaint when there is nothing to be done 19 20vmlinux vmlinux.unstripped: FORCE 21 @true 22ifdef CONFIG_RELOCATABLE 23 $(call if_changed,relocs_check) 24endif 25 26clean: 27 @true 28 29PHONY += FORCE clean 30 31FORCE: 32 33.PHONY: $(PHONY) 34