check-static-inits: Filter out zero-length sections
When compiling with -O0, zero-sized constructors were showing up and confusing the test.
This commit is contained in:
parent
b695a3dc23
commit
2272318665
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue