From da83fa8ab29ca2e624b9c2f312eacf9585a666f5 Mon Sep 17 00:00:00 2001 From: wangjianyu3 Date: Fri, 29 Mar 2024 20:30:43 +0800 Subject: [PATCH] tools/mksymtab.sh: Check sed expression sed: -e expression #1, char 0: no previous regular expression Signed-off-by: wangjianyu3 --- tools/mksymtab.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/mksymtab.sh b/tools/mksymtab.sh index a77604024..e72196791 100755 --- a/tools/mksymtab.sh +++ b/tools/mksymtab.sh @@ -53,7 +53,9 @@ if [ -z "$varlist" ]; then # Remove the intersection between them, and the remaining symbols are found in the main image common=`echo "$varlist" | tr ' ' '\n' | grep -Fxf <(echo "$deflist" | tr ' ' '\n') | tr '\n' ' '` - varlist=`echo $varlist | sed "s/$common//g"` + if [ "x$common" != "x" ]; then + varlist=`echo $varlist | sed "s/$common//g"` + fi fi fi