| 1 |
# SPDX-License-Identifier: GPL-2.0 |
| 2 |
# =========================================================================== |
| 3 |
# Post-link riscv pass |
| 4 |
# =========================================================================== |
| 5 |
# |
| 6 |
# Check that vmlinux relocations look sane |
| 7 |
|
| 8 |
PHONY := __archpost |
| 9 |
__archpost: |
| 10 |
|
| 11 |
-include include/config/auto.conf |
| 12 |
include $(srctree)/scripts/Kbuild.include |
| 13 |
|
| 14 |
quiet_cmd_relocs_check = CHKREL $@ |
| 15 |
cmd_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 |
|
| 20 |
vmlinux vmlinux.unstripped: FORCE |
| 21 |
@true |
| 22 |
ifdef CONFIG_RELOCATABLE |
| 23 |
$(call if_changed,relocs_check) |
| 24 |
endif |
| 25 |
|
| 26 |
clean: |
| 27 |
@true |
| 28 |
|
| 29 |
PHONY += FORCE clean |
| 30 |
|
| 31 |
FORCE: |
| 32 |
|
| 33 |
.PHONY: $(PHONY) |