Skip to content

Commit 9b5c37b

Browse files
Vasily Gorbikhcahca
authored andcommitted
s390/decompressor: add link map saving
Produce arch/s390/boot/vmlinux.map link map for the decompressor, when CONFIG_VMLINUX_MAP option is enabled. Link map is quite useful during making kernel changes related to how the decompressor is composed and debugging linker scripts. Acked-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent e688c62 commit 9b5c37b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/s390/boot/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ targets += vmlinux.bin.zst info.bin syms.bin vmlinux.syms $(obj-all)
5252
OBJECTS := $(addprefix $(obj)/,$(obj-y))
5353
OBJECTS_ALL := $(addprefix $(obj)/,$(obj-all))
5454

55+
clean-files += vmlinux.map
56+
5557
quiet_cmd_section_cmp = SECTCMP $*
5658
define cmd_section_cmp
5759
s1=`$(OBJDUMP) -t -j "$*" "$<" | sort | \
@@ -71,7 +73,7 @@ $(obj)/bzImage: $(obj)/vmlinux $(obj)/section_cmp.boot.data $(obj)/section_cmp.b
7173
$(obj)/section_cmp%: vmlinux $(obj)/vmlinux FORCE
7274
$(call if_changed,section_cmp)
7375

74-
LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup --build-id=sha1 -T
76+
LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup $(if $(CONFIG_VMLINUX_MAP),-Map=$(obj)/vmlinux.map) --build-id=sha1 -T
7577
$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS_ALL) FORCE
7678
$(call if_changed,ld)
7779

0 commit comments

Comments
 (0)