From 22723186652224a635f1dad5cda0f753e78c301d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 1 Oct 2014 11:56:07 -0400 Subject: [PATCH] check-static-inits: Filter out zero-length sections When compiling with -O0, zero-sized constructors were showing up and confusing the test. --- src/check-static-inits.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check-static-inits.sh b/src/check-static-inits.sh index 6b03dd21d..1446fa734 100755 --- a/src/check-static-inits.sh +++ b/src/check-static-inits.sh @@ -22,7 +22,7 @@ fi echo "Checking that no object file has static initializers" for obj in $OBJS; do - if objdump -t "$obj" | grep '[.][cd]tors'; then + if objdump -t "$obj" | grep '[.][cd]tors' | grep -v '\<00*\>'; then echo "Ouch, $obj has static initializers/finalizers" stat=1 fi