162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciGENERIC_VDSO_MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) 462306a36Sopenharmony_ciGENERIC_VDSO_DIR := $(dir $(GENERIC_VDSO_MK_PATH)) 562306a36Sopenharmony_ci 662306a36Sopenharmony_cic-gettimeofday-$(CONFIG_GENERIC_GETTIMEOFDAY) := $(addprefix $(GENERIC_VDSO_DIR), gettimeofday.c) 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci# This cmd checks that the vdso library does not contain dynamic relocations. 962306a36Sopenharmony_ci# It has to be called after the linking of the vdso library and requires it 1062306a36Sopenharmony_ci# as a parameter. 1162306a36Sopenharmony_ci# 1262306a36Sopenharmony_ci# As a workaround for some GNU ld ports which produce unneeded R_*_NONE 1362306a36Sopenharmony_ci# dynamic relocations, ignore R_*_NONE. 1462306a36Sopenharmony_ciquiet_cmd_vdso_check = VDSOCHK $@ 1562306a36Sopenharmony_ci cmd_vdso_check = if $(READELF) -rW $@ | grep -v _NONE | grep -q " R_\w*_"; \ 1662306a36Sopenharmony_ci then (echo >&2 "$@: dynamic relocations are not supported"; \ 1762306a36Sopenharmony_ci rm -f $@; /bin/false); fi 18