Better check #2240

This commit is contained in:
Alexey Milovidov 2018-05-11 15:00:02 +03:00
parent 11313e94c7
commit 5241a81015

View File

@ -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