undefined-symbols (357B)
1 #!/usr/bin/env bash 2 3 usage () { 4 printf "usage: undefined-symbols lib.a\n\n" 5 printf " print external undefined symbols in an archive\n\n" 6 exit 1 7 } 8 9 [ -z "$1" ] && usage 10 11 exec comm -13 \ 12 <(nm "$1" | egrep ' [BDTW] ' | sed -e 's/.* [BDTW] //' | sort -u) \ 13 <(nm "$1" | grep ' U ' | sed -e 's/.* U //' | sort -u) \ 14 | grep -v '^_' \ 15 | less