arm64: Support running gen_vdso_offsets.sh with BSD userland.
authorJohn Millikin <john@john-millikin.com>
Wed, 23 Dec 2020 05:10:56 +0000 (14:10 +0900)
committerWill Deacon <will@kernel.org>
Wed, 20 Jan 2021 12:23:27 +0000 (12:23 +0000)
BSD sed ignores whitespace character escape sequences such as '\t' in
the replacement string, causing this script to produce the following
incorrect output:

  #define vdso_offset_sigtrampt0x089c

Changing the hard tab to ' ' causes both BSD and GNU dialects of sed
to produce equivalent output.

Signed-off-by: John Millikin <john@john-millikin.com>
Link: https://lore.kernel.org/r/15147ffb-7e67-b607-266d-f56599ecafd1@john-millikin.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/vdso/gen_vdso_offsets.sh

index 8b806eacd0a6cd6d89c6a9517c88a9d4be1df8fa..0387209d65b17f6eeae6742a532755a008963cf7 100755 (executable)
@@ -13,4 +13,4 @@
 
 LC_ALL=C
 sed -n -e 's/^00*/0/' -e \
-'s/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2\t0x\1/p'
+'s/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2 0x\1/p'