xref: /linux/arch/s390/Makefile.postlink (revision fd8c09ad0d87783b9b6a27900d66293be45b7bad)
1# SPDX-License-Identifier: GPL-2.0
2# ===========================================================================
3# Post-link s390 pass
4# ===========================================================================
5#
6# 1. Separate relocations from vmlinux into relocs.S.
7# 2. Strip relocations from vmlinux.
8
9PHONY := __archpost
10__archpost:
11
12-include include/config/auto.conf
13include $(srctree)/scripts/Kbuild.include
14include $(srctree)/scripts/Makefile.lib
15
16CMD_RELOCS=arch/s390/tools/relocs
17OUT_RELOCS = arch/s390/boot
18quiet_cmd_relocs = RELOCS  $(OUT_RELOCS)/relocs.S
19      cmd_relocs = \
20	mkdir -p $(OUT_RELOCS); \
21	$(CMD_RELOCS) $@ > $(OUT_RELOCS)/relocs.S
22
23vmlinux: FORCE
24	$(call cmd,relocs)
25	$(call cmd,strip_relocs)
26
27clean:
28	@rm -f $(OUT_RELOCS)/relocs.S
29
30PHONY += FORCE clean
31
32FORCE:
33
34.PHONY: $(PHONY)
35