Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | #!/bin/sh |
michael@0 | 2 | |
michael@0 | 3 | LC_ALL=C |
michael@0 | 4 | export LC_ALL |
michael@0 | 5 | |
michael@0 | 6 | test -z "$srcdir" && srcdir=. |
michael@0 | 7 | stat=0 |
michael@0 | 8 | |
michael@0 | 9 | |
michael@0 | 10 | if which objdump 2>/dev/null >/dev/null; then |
michael@0 | 11 | : |
michael@0 | 12 | else |
michael@0 | 13 | echo "check-static-inits.sh: 'objdump' not found; skipping test" |
michael@0 | 14 | exit 77 |
michael@0 | 15 | fi |
michael@0 | 16 | |
michael@0 | 17 | OBJS=.libs/*.o |
michael@0 | 18 | if test "x`echo $OBJS`" = "x$OBJS" 2>/dev/null >/dev/null; then |
michael@0 | 19 | echo "check-static-inits.sh: object files not found; skipping test" |
michael@0 | 20 | exit 77 |
michael@0 | 21 | fi |
michael@0 | 22 | |
michael@0 | 23 | echo "Checking that no object file has static initializers" |
michael@0 | 24 | for obj in $OBJS; do |
michael@0 | 25 | if objdump -t "$obj" | grep '[.]ctors'; then |
michael@0 | 26 | echo "Ouch, $obj has static initializers" |
michael@0 | 27 | stat=1 |
michael@0 | 28 | fi |
michael@0 | 29 | done |
michael@0 | 30 | |
michael@0 | 31 | echo "Checking that no object file has lazy static C++ constructors/destructors or other such stuff" |
michael@0 | 32 | for obj in $OBJS; do |
michael@0 | 33 | if objdump -t "$obj" | grep '__c'; then |
michael@0 | 34 | echo "Ouch, $obj has lazy static C++ constructors/destructors or other such stuff" |
michael@0 | 35 | stat=1 |
michael@0 | 36 | fi |
michael@0 | 37 | done |
michael@0 | 38 | |
michael@0 | 39 | exit $stat |