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