1*4882a593Smuzhiyun#!/bin/sh 2*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun# Match symbols in the DSO that look like VDSO_*; produce a header file 6*4882a593Smuzhiyun# of constant offsets into the shared object. 7*4882a593Smuzhiyun# 8*4882a593Smuzhiyun# Doing this inside the Makefile will break the $(filter-out) function, 9*4882a593Smuzhiyun# causing Kbuild to rebuild the vdso-offsets header file every time. 10*4882a593Smuzhiyun# 11*4882a593Smuzhiyun# Author: Will Deacon <will.deacon@arm.com> 12*4882a593Smuzhiyun# 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunLC_ALL=C 15*4882a593Smuzhiyunsed -n -e 's/^00*/0/' -e \ 16*4882a593Smuzhiyun's/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2\t0x\1/p' 17