X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=scripts%2Fgen_ksymdeps.sh;h=8ee533f33659b1d904020b1c70ef13c249e41ea4;hb=e99f23c5bf59219d0cd9b6e0d7d4c1b641a98704;hp=1324986e1362c594ee48bc7da8f13828d5179ca8;hpb=6569df3d6280a9c89cd4bb020b44a689ef0783a9;p=linux-2.6-microblaze.git diff --git a/scripts/gen_ksymdeps.sh b/scripts/gen_ksymdeps.sh index 1324986e1362..8ee533f33659 100755 --- a/scripts/gen_ksymdeps.sh +++ b/scripts/gen_ksymdeps.sh @@ -4,7 +4,13 @@ set -e # List of exported symbols -ksyms=$($NM $1 | sed -n 's/.*__ksym_marker_\(.*\)/\1/p' | tr A-Z a-z) +# +# If the object has no symbol, $NM warns 'no symbols'. +# Suppress the stderr. +# TODO: +# Use -q instead of 2>/dev/null when we upgrade the minimum version of +# binutils to 2.37, llvm to 13.0.0. +ksyms=$($NM $1 2>/dev/null | sed -n 's/.*__ksym_marker_\(.*\)/\1/p') if [ -z "$ksyms" ]; then exit 0 @@ -15,8 +21,7 @@ echo "ksymdeps_$1 := \\" for s in $ksyms do - echo $s | sed -e 's:^_*: $(wildcard include/ksym/:' \ - -e 's:__*:/:g' -e 's/$/.h) \\/' + printf ' $(wildcard include/ksym/%s) \\\n' "$s" done echo