1*c6b99bedSHuacai Chen#!/bin/sh 2*c6b99bedSHuacai Chen# SPDX-License-Identifier: GPL-2.0 3*c6b99bedSHuacai Chen 4*c6b99bedSHuacai Chen# 5*c6b99bedSHuacai Chen# Derived from RISC-V and ARM64: 6*c6b99bedSHuacai Chen# Author: Will Deacon <will.deacon@arm.com> 7*c6b99bedSHuacai Chen# 8*c6b99bedSHuacai Chen# Match symbols in the DSO that look like VDSO_*; produce a header file 9*c6b99bedSHuacai Chen# of constant offsets into the shared object. 10*c6b99bedSHuacai Chen# 11*c6b99bedSHuacai Chen 12*c6b99bedSHuacai ChenLC_ALL=C sed -n -e 's/^00*/0/' -e \ 13*c6b99bedSHuacai Chen's/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2\t0x\1/p' 14