crypto/ccp: support device init
[dpdk.git] / buildtools / check-experimental-syms.sh
1 #!/bin/sh
2
3 # SPDX-License-Identifier: BSD-3-Clause
4
5 MAPFILE=$1
6 OBJFILE=$2
7
8 if [ -d $MAPFILE ]
9 then
10         exit 0
11 fi
12
13 for i in `awk 'BEGIN {found=0}
14                 /.*EXPERIMENTAL.*/ {found=1}
15                 /.*}.*;/ {found=0}
16                 /.*;/ {if (found == 1) print $1}' $MAPFILE`
17 do
18         SYM=`echo $i | sed -e"s/;//"`
19         objdump -t $OBJFILE | grep -q "\.text.*$SYM"
20         IN_TEXT=$?
21         objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM"
22         IN_EXP=$?
23         if [ $IN_TEXT -eq 0 -a $IN_EXP -ne 0 ]
24         then
25                 cat >&2 <<- END_OF_MESSAGE
26                 $SYM is not flagged as experimental
27                 but is listed in version map
28                 Please add __rte_experimental to the definition of $SYM
29                 END_OF_MESSAGE
30                 exit 1
31         fi
32 done
33 exit 0
34