From d830351bfa454a560aa0566a9d22aff910bcf456 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 30 Oct 2017 15:27:25 +0000 Subject: [PATCH] gbm: fail symbol check if lib is missing Signed-off-by: Eric Engestrom Reviewed-by: Dylan Baker Reviewed-by: Emil Velikov --- src/gbm/gbm-symbols-check | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gbm/gbm-symbols-check b/src/gbm/gbm-symbols-check index 2444131e990..cf57a08d572 100755 --- a/src/gbm/gbm-symbols-check +++ b/src/gbm/gbm-symbols-check @@ -1,6 +1,15 @@ #!/bin/sh +set -eu -FUNCS=$(nm -D --defined-only ${1-.libs/libgbm.so} | grep -o "T .*" | cut -c 3- | while read func; do +LIB=${1-.libs/libgbm.so} + +if ! [ -f "$LIB" ] +then + exit 1 +fi + + +FUNCS=$(nm -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do ( grep -q "^$func$" || echo $func ) <