crypto/qat: add device files
[dpdk.git] / devtools / check-symbol-maps.sh
1 #! /bin/sh -e
2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright 2018 Mellanox Technologies, Ltd
4
5 cd $(dirname $0)/..
6
7 # speed up by ignoring Unicode details
8 export LC_ALL=C
9
10 find_orphan_symbols ()
11 {
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                 continue
16             fi
17             if ! grep -q -r --exclude=$(basename $map) \
18                     -w $sym $(dirname $map) ; then
19                 echo "$map: $sym"
20             fi
21         done
22     done
23 }
24
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,'
29     exit 1
30 fi