mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-27 04:54:41 +08:00
b71dca9891
This is considerably faster then parsing the objdump asm output. It will also make the enabling of llvm-objdump a little easier. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200812081036.7969-2-sfr@canb.auug.org.au
49 lines
1.2 KiB
Makefile
49 lines
1.2 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# ===========================================================================
|
|
# Post-link powerpc pass
|
|
# ===========================================================================
|
|
#
|
|
# 1. Check that vmlinux relocations look sane
|
|
|
|
PHONY := __archpost
|
|
__archpost:
|
|
|
|
-include include/config/auto.conf
|
|
include scripts/Kbuild.include
|
|
|
|
quiet_cmd_head_check = CHKHEAD $@
|
|
cmd_head_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/head_check.sh "$(NM)" "$@"
|
|
|
|
quiet_cmd_relocs_check = CHKREL $@
|
|
ifdef CONFIG_PPC_BOOK3S_64
|
|
cmd_relocs_check = \
|
|
$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@" ; \
|
|
$(BASH) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$(NM)" "$@"
|
|
else
|
|
cmd_relocs_check = \
|
|
$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@"
|
|
endif
|
|
|
|
# `@true` prevents complaint when there is nothing to be done
|
|
|
|
vmlinux: FORCE
|
|
@true
|
|
ifdef CONFIG_PPC64
|
|
$(call cmd,head_check)
|
|
endif
|
|
ifdef CONFIG_RELOCATABLE
|
|
$(call if_changed,relocs_check)
|
|
endif
|
|
|
|
%.ko: FORCE
|
|
@true
|
|
|
|
clean:
|
|
rm -f .tmp_symbols.txt
|
|
|
|
PHONY += FORCE clean
|
|
|
|
FORCE:
|
|
|
|
.PHONY: $(PHONY)
|