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"
16 def_name=$(basename $def_path)
19 lib_result=$(mktemp /tmp/defname.XXXXXX)
21 # FIXME 0.11: in 0.11, we should change the export filter to only export
22 # _gst_foo, but not __gst_foo (we can't change this now, since we added
23 # __gst_debug_min and __gst_debug_enabled at some point and need to keep
24 # ABI compatibility). So below we special-case some symbols that shouldn't
25 # really be exported, either because we're too lazy to rename them to something
26 # that's not exported (like the _gst_parse_* stuff) or because we had them in
27 # public headers at some point although they shouldn't be and so we need to
28 # keep them exported now (like _gst_debug_init,
29 # __gst_element_factory_add_interface or
30 # __gst_element_factory_add_static_pad_template). We suppress them here to
31 # make sure they're at least not exported in the windows msvc build (they
32 # were never in the .def file, so they never got exported).
35 if ($3 !~ /^_gst_parse_yy/ &&
36 $3 !~ /^_gst_[a-z]*_init/ &&
37 $3 !~ /^_gst_parse_launch/ &&
38 $3 !~ /^__gst_element_details_/ &&
39 $3 !~ /^__gst_element_factory_add_/ &&
40 $3 !~ /^gst_interfaces_marshal/)
42 if ($2 == "B" || $2 == "S")
47 }' | sort | awk '{ if (NR == 1) print "EXPORTS"; print $0; }' \
50 diffoutput=`diff -u $def_path $lib_result`
54 if test "x$diffoutput" = "x"; then
57 echo -n "$diffoutput" >&2