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