[PATCH 2/2] s390/decompressor: support link map saving

From: Vasily Gorbik
Date: Fri Oct 23 2020 - 07:58:05 EST


Produce arch/s390/boot/compressed/vmlinux.map link map for the
decompressor, when CONFIG_SAVE_LINK_MAP option is enabled.

Signed-off-by: Vasily Gorbik <gor@xxxxxxxxxxxxx>
---
arch/s390/boot/compressed/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/s390/boot/compressed/Makefile b/arch/s390/boot/compressed/Makefile
index b235ed95a3d8..859a5c7c9ca7 100644
--- a/arch/s390/boot/compressed/Makefile
+++ b/arch/s390/boot/compressed/Makefile
@@ -21,7 +21,9 @@ OBJCOPYFLAGS :=

OBJECTS := $(addprefix $(obj)/,$(obj-y))

-LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T
+clean-files += vmlinux.map
+
+LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup $(if $(CONFIG_SAVE_LINK_MAP),-Map=$(obj)/vmlinux.map) -T
$(obj)/vmlinux: $(obj)/vmlinux.lds $(objtree)/arch/s390/boot/startup.a $(OBJECTS) FORCE
$(call if_changed,ld)

--
2.25.4