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
15 symsrc=${sym#per_lcore_}
16 elif echo $sym | grep -q '^__rte_.*_trace_' ; then
21 if ! grep -q -r --exclude=$(basename $map) \
22 -w $symsrc $(dirname $map) ; then
29 orphan_symbols=$(find_orphan_symbols)
30 if [ -n "$orphan_symbols" ] ; then
31 echo "Found only in symbol map file:"
32 echo "$orphan_symbols" | sed 's,^,\t,'