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