From 8ab49cb4aa52469b2518e578856995325f807f6a Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Thu, 30 Sep 2021 16:11:09 -0700 Subject: [PATCH] [BOLT] link_fdata: accept symbols with slash in the name Summary: Change sed separator to allow replacing symbols with slash in the name. This is required for symbol names produced by BOLT which include "/1" suffix. (cherry picked from FBD31324540) --- bolt/test/link_fdata.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bolt/test/link_fdata.sh b/bolt/test/link_fdata.sh index 348dadc2957e..c7f41b876b05 100755 --- a/bolt/test/link_fdata.sh +++ b/bolt/test/link_fdata.sh @@ -7,12 +7,12 @@ mapfile -t symbols < <(nm --defined-only "$2") for line in "${symbols[@]}"; do val=$(echo $line | cut -d' ' -f1) - symname=$(echo $line | awk '{ $1=$2=""; print $0 }' | sed 's/^[ \t]*//') + symname=$(echo $line | awk '{ $1=$2=""; print $0 }' | sed 's|^[ \t]*||') if [ -z "$symname" ]; then continue fi if [ -z "${val##*[!0-9a-fA-F]*}" ]; then continue fi - sed -i -e "s/\#${symname}\#/$val/g" $3 + sed -i -e "s|\#${symname}\#|$val|g" $3 done