11 TMPFILE="$(mktemp .nm-check-exports.XXXXXX)"
16 sed -n 's/^[[:xdigit:]]\+ [DT] //p' |
21 sed -n 's/^\t\(\([_a-zA-Z0-9]\+\)\|#\s*\([_a-zA-Z0-9]\+@@\?[_a-zA-Z0-9]\+\)\);$/\2\3/p' "$1" |
26 sed "s/.*/$PATTERN\0$PATTERN/"
30 sed "s/^$PATTERN\(.*\)$PATTERN\$/\1/"
34 get_syms "$so" | anchor > "$TMPFILE"
35 WRONG="$(get_syms_from_def "$def" | anchor | grep -F -f - "$TMPFILE" -v)"
37 if [ $RESULT -eq 0 ]; then
39 echo ">>library \"$so\" exports symbols that are not in linker script \"$def\":"
40 echo "$WRONG" | unanchor | nl
43 get_syms_from_def "$def" | anchor > "$TMPFILE"
44 WRONG="$(get_syms "$so" | anchor | grep -F -f - "$TMPFILE" -v)"
46 if [ $RESULT -eq 0 ]; then
48 echo ">>linker script \"$def\" contains symbols that are not exported by library \"$so\":"
49 echo "$WRONG" | unanchor | nl