mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
7f6d8f7e43
The '%.ko' rule in arch/*/Makefile.postlink does nothing but call the 'true' command. Remove the unneeded code. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <n.schier@avm.de>
45 lines
1.1 KiB
Makefile
45 lines
1.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# ===========================================================================
|
|
# Post-link x86 pass
|
|
# ===========================================================================
|
|
#
|
|
# 1. Separate relocations from vmlinux into vmlinux.relocs.
|
|
# 2. Strip relocations from vmlinux.
|
|
|
|
PHONY := __archpost
|
|
__archpost:
|
|
|
|
-include include/config/auto.conf
|
|
include $(srctree)/scripts/Kbuild.include
|
|
|
|
CMD_RELOCS = arch/x86/tools/relocs
|
|
OUT_RELOCS = arch/x86/boot/compressed
|
|
quiet_cmd_relocs = RELOCS $(OUT_RELOCS)/$@.relocs
|
|
cmd_relocs = \
|
|
mkdir -p $(OUT_RELOCS); \
|
|
$(CMD_RELOCS) $@ > $(OUT_RELOCS)/$@.relocs; \
|
|
$(CMD_RELOCS) --abs-relocs $@
|
|
|
|
quiet_cmd_strip_relocs = RSTRIP $@
|
|
cmd_strip_relocs = \
|
|
$(OBJCOPY) --remove-section='.rel.*' --remove-section='.rel__*' \
|
|
--remove-section='.rela.*' --remove-section='.rela__*' $@
|
|
|
|
# `@true` prevents complaint when there is nothing to be done
|
|
|
|
vmlinux: FORCE
|
|
@true
|
|
ifeq ($(CONFIG_X86_NEED_RELOCS),y)
|
|
$(call cmd,relocs)
|
|
$(call cmd,strip_relocs)
|
|
endif
|
|
|
|
clean:
|
|
@rm -f $(OUT_RELOCS)/vmlinux.relocs
|
|
|
|
PHONY += FORCE clean
|
|
|
|
FORCE:
|
|
|
|
.PHONY: $(PHONY)
|