2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright 2018 Mellanox Technologies, Ltd
7 # speed up by ignoring Unicode details
10 find_orphan_symbols ()
12 for map in $(find lib drivers -name '*.map') ; do
13 for sym in $(sed -rn 's,^([^}]*_.*);,\1,p' $map) ; do
14 if echo $sym | grep -q '^per_lcore_' ; then
17 if ! grep -q -r --exclude=$(basename $map) \
18 -w $sym $(dirname $map) ; then
25 orphan_symbols=$(find_orphan_symbols)
26 if [ -n "$orphan_symbols" ] ; then
27 echo "Found only in symbol map file:"
28 echo "$orphan_symbols" | sed 's,^,\t,'