gen_vdso_offsets.sh 364 B

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