1*779df224SSven Schnelle#!/bin/sh 2*779df224SSven Schnelle# SPDX-License-Identifier: GPL-2.0 3*779df224SSven Schnelle 4*779df224SSven Schnelle# 5*779df224SSven Schnelle# Match symbols in the DSO that look like VDSO_*; produce a header file 6*779df224SSven Schnelle# of constant offsets into the shared object. 7*779df224SSven Schnelle# 8*779df224SSven Schnelle# Doing this inside the Makefile will break the $(filter-out) function, 9*779df224SSven Schnelle# causing Kbuild to rebuild the vdso-offsets header file every time. 10*779df224SSven Schnelle# 11*779df224SSven Schnelle# Inspired by arm64 version. 12*779df224SSven Schnelle# 13*779df224SSven Schnelle 14*779df224SSven SchnelleLC_ALL=C 15*779df224SSven Schnellesed -n 's/\([0-9a-f]*\) . __kernel_\(.*\)/\#define vdso64_offset_\2\t0x\1/p' 16