diff --git a/utils/link-validate/link-validate.sh b/utils/link-validate/link-validate.sh index 612956d292a..2d8d57b95fc 100755 --- a/utils/link-validate/link-validate.sh +++ b/utils/link-validate/link-validate.sh @@ -11,7 +11,7 @@ verlte() { ALLOWED_SHARED_LIBS=("libdl.so.2" "libpthread.so.0" "librt.so.1" "libm.so.6" "libc.so.6" "ld-linux-x86-64.so.2") -if [ "$#" -ne 2 ]; then +if [ "$#" -lt 1 ]; then echo "USAGE: link-validate.sh BINNAME GLIBC_VERSION" exit 1 fi @@ -19,7 +19,7 @@ fi # Step 1: glibc version for i in $(objdump -T "$1" | awk '{print $5}' | grep GLIBC | sed 's/ *$//g' | sed 's/GLIBC_//' | sort | uniq); do - if ! verlte "$i" "$2"; then + if ! verlte "$i" "${2:-2.10}"; then echo "Dependency on newer libc detected: $i" exit 1 fi