tools: simplify symbol visiblity check script
authorDan Williams <dcbw@redhat.com>
Mon, 23 Jul 2012 14:16:24 +0000 (09:16 -0500)
committerDan Williams <dcbw@redhat.com>
Mon, 23 Jul 2012 14:17:04 +0000 (09:17 -0500)
Using nm is way simpler, and actually less error-prone.

tools/check-exports.sh

index 3c75ef0..b5a9e95 100755 (executable)
@@ -8,7 +8,7 @@ so=$1
 def=$2
 
 # Have to prefix with a tab and suffix with a ';' to match .ver file format
-get_syms='( objdump -t "$so" | grep "^[^ ]* [^l.*]*[.]"; objdump -t "$so" | grep "^[^ ]* l[^.*]*\.text[^_]*nm_" | grep -v "_init"; ) | sed "s/.* //" | sed "s/^/\t/" | sed "s/$/;/"'
+get_syms='nm "$so" | grep "^[[:xdigit:]]\+ T " | sed "s/^[[:xdigit:]]\+ T //" | sed "s/^/\t/" | sed "s/$/;/"'
 
 echo $so: checking exported symbols against $def