Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add checkglobals.sh script to list all globals found

  • Loading branch information...
commit 74c0a15a554e5c1aeaf179a73dce7411db55d73d 1 parent d899996
@dottedmag dottedmag authored
Showing with 29 additions and 0 deletions.
  1. +29 −0 checkglobals.sh
View
29 checkglobals.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+OS=$(uname -s)
+
+case "$OS" in
+ Linux)
+ NM_ARGS='--defined-only'
+ FILTER=' [Ttr] '
+ ;;
+ Darwin)
+ NM_ARGS='-U -m'
+ FILTER=',(__eh_frame|__cstring|__text|__const)'
+ ;;
+ *)
+ echo "Unknown operating system: $OS" >&2
+ exit 1;;
+esac
+
+for dotlibs_dir in $(find . -name .libs)
+do
+ dir=${dotlibs_dir%/.libs}
+ dir=${dir#./}
+ echo '----------------------------------------------------------------------'
+ echo "$dir"
+ echo '----------------------------------------------------------------------'
+ echo
+ (cd $dir/.libs
+ nm $NM_ARGS *.o 2>/dev/null | egrep -v "$FILTER")
+done
Please sign in to comment.
Something went wrong with that request. Please try again.