1 # SPDX-License-Identifier: GPL-2.0-only
2 # ==========================================================================
3 # Install unstripped copies of vDSO
4 # ==========================================================================
10 include $(srctree)/scripts/Kbuild.include
12 install-dir := $(MODLIB)/vdso
14 define gen_install_rules
16 dest := $(install-dir)/$$(patsubst %.dbg,%,$$(notdir $(1)))
22 # Some architectures create .build-id symlinks
23 ifneq ($(filter arm s390 sparc x86, $(SRCARCH)),)
24 link := $(install-dir)/.build-id/$$(shell $(READELF) -n $(1) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug
27 $$(link): $$(dest) FORCE
33 $(foreach x, $(sort $(INSTALL_FILES)), $(eval $(call gen_install_rules,$(x))))
35 quiet_cmd_install = INSTALL $@
36 cmd_install = mkdir -p $(dir $@); cp $< $@
38 quiet_cmd_symlink = SYMLINK $@
39 cmd_symlink = mkdir -p $(dir $@); ln -sf --relative $< $@