3 # Purpose of this script is to check library exported symbols
7 WARN
="WARNING : WARNING : WARNING : WARNING : WARNING : WARNING : WARNING : WARNING"
13 if objdump
--syms "$1" |
grep "$2" 2>&1 > /dev
/null
; then
22 find ..
/libs
/ -name '*.o' |
while read obj
; do grep_sym
"$obj" "$1"; done
27 objdump
--dynamic-syms "$1" |
awk 'NR > 4 { print }' |
awk '$3 != "*UND*"' |
awk '{print $NF}' > "$2"
30 # Remove compiler and glibc symbols
32 sed -i '/^.init$/d' "$2"
33 sed -i '/^__.*$/d' "$2"
34 sed -i '/^_.*$/d' "$2"
42 for i
in `cat $symfile`; do
43 if ! grep "^$i$" $@
2>&1 > /dev
/null
; then
44 if [ -z "$FOUND" ]; then
47 echo "Following new API symbols found:"
58 get_symbols
"$1" $SYMTMPFILE
60 check_symbols
$SYMTMPFILE "$@"
64 do_check libgfxprim.so syms
/core_symbols.txt syms
/input_symbols.txt \
65 syms
/filters_symbols.txt syms
/gfx_symbols.txt \
68 do_check libgfxprim-backends.so syms
/backend_symbols.txt
70 do_check libgfxprim-grabbers.so syms
/grabbers_symbols.txt
72 do_check libgfxprim-loaders.so syms
/loaders_symbols.txt
74 if [ -n "$FOUND" ]; then
76 echo "Set them static or update lists of exported functions in syms/foo_symbols.txt"
80 echo "No unexpected symbols found :)"