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