summaryrefslogtreecommitdiff
path: root/arch/loongarch/boot/Makefile
blob: 0125b17edc98c837d97854aca474b90d021c92cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#
# arch/loongarch/boot/Makefile
#
# Copyright (C) 2020-2022 Loongson Technology Corporation Limited
#

drop-sections := .comment .note .options .note.gnu.build-id
strip-flags   := $(addprefix --remove-section=,$(drop-sections)) -S
OBJCOPYFLAGS_vmlinux.efi := -O binary $(strip-flags)

targets := vmlinux
quiet_cmd_strip = STRIP	  $@
      cmd_strip = $(STRIP) -s -o $@ $<

$(obj)/vmlinux: vmlinux FORCE
	$(call if_changed,strip)