18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciGENERIC_VDSO_MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) 48c2ecf20Sopenharmony_ciGENERIC_VDSO_DIR := $(dir $(GENERIC_VDSO_MK_PATH)) 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_cic-gettimeofday-$(CONFIG_GENERIC_GETTIMEOFDAY) := $(addprefix $(GENERIC_VDSO_DIR), gettimeofday.c) 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci# This cmd checks that the vdso library does not contain absolute relocation 98c2ecf20Sopenharmony_ci# It has to be called after the linking of the vdso library and requires it 108c2ecf20Sopenharmony_ci# as a parameter. 118c2ecf20Sopenharmony_ci# 128c2ecf20Sopenharmony_ci# $(ARCH_REL_TYPE_ABS) is defined in the arch specific makefile and corresponds 138c2ecf20Sopenharmony_ci# to the absolute relocation types printed by "objdump -R" and accepted by the 148c2ecf20Sopenharmony_ci# dynamic linker. 158c2ecf20Sopenharmony_ciifndef ARCH_REL_TYPE_ABS 168c2ecf20Sopenharmony_ci$(error ARCH_REL_TYPE_ABS is not set) 178c2ecf20Sopenharmony_ciendif 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciquiet_cmd_vdso_check = VDSOCHK $@ 208c2ecf20Sopenharmony_ci cmd_vdso_check = if $(OBJDUMP) -R $@ | grep -E -h "$(ARCH_REL_TYPE_ABS)"; \ 218c2ecf20Sopenharmony_ci then (echo >&2 "$@: dynamic relocations are not supported"; \ 228c2ecf20Sopenharmony_ci rm -f $@; /bin/false); fi 23