| 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 |
|
| 9 |
PHONY := __archpost |
| 10 |
__archpost: |
| 11 |
|
| 12 |
-include include/config/auto.conf |
| 13 |
include $(srctree)/scripts/Kbuild.include |
| 14 |
|
| 15 |
CMD_RELOCS=arch/s390/tools/relocs |
| 16 |
OUT_RELOCS = arch/s390/boot |
| 17 |
quiet_cmd_relocs = RELOCS $(OUT_RELOCS)/relocs.S |
| 18 |
cmd_relocs = \ |
| 19 |
mkdir -p $(OUT_RELOCS); \ |
| 20 |
$(CMD_RELOCS) $@ > $(OUT_RELOCS)/relocs.S |
| 21 |
|
| 22 |
vmlinux.unstripped: FORCE |
| 23 |
$(call cmd,relocs) |
| 24 |
|
| 25 |
clean: |
| 26 |
@rm -f $(OUT_RELOCS)/relocs.S |
| 27 |
|
| 28 |
PHONY += FORCE clean |
| 29 |
|
| 30 |
FORCE: |
| 31 |
|
| 32 |
.PHONY: $(PHONY) |