4 # quick'n'dirty script that retrieves the list of exported symbols of a given
5 # library using 'nm', and compares that against the list of symbols-to-export
6 # of our win32/common/libfoo.def files.
9 echo "Usage: $0 library.def library.so"
14 def_name="$(basename $def_path)"
17 lib_result="`mktemp /tmp/defname.XXXXXX`"
22 # On Solaris, add -p to get the correct output format
24 if nm -V 2>&1 |grep Solaris > /dev/null; then
28 # _end is special cased because for some reason it is reported as an exported
29 # BSS symbol, unlike on linux where it's a local absolute symbol.
30 nm $NMARGS $lib_path | awk \
32 if ($3 ~ /^[_]?(gst_|Gst|GST_).*/)
39 }' | sort | awk '{ if (NR == 1) print "EXPORTS"; print $0; }' \
42 diffoutput=`diff -u $def_path $lib_result`
47 if test "$diffresult" -eq 0; then
50 echo -n "$diffoutput" >&2