net/softnic: support service cores
[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 # added check for "make -C test/" usage
9 if [ ! -e $MAPFILE ] || [ ! -f $OBJFILE ]
10 then
11         exit 0
12 fi
13
14 if [ -d $MAPFILE ]
15 then
16         exit 0
17 fi
18
19 for i in `awk 'BEGIN {found=0}
20                 /.*EXPERIMENTAL.*/ {found=1}
21                 /.*}.*;/ {found=0}
22                 /.*;/ {if (found == 1) print $1}' $MAPFILE`
23 do
24         SYM=`echo $i | sed -e"s/;//"`
25         objdump -t $OBJFILE | grep -q "\.text.*$SYM$"
26         IN_TEXT=$?
27         objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM$"
28         IN_EXP=$?
29         if [ $IN_TEXT -eq 0 -a $IN_EXP -ne 0 ]
30         then
31                 cat >&2 <<- END_OF_MESSAGE
32                 $SYM is not flagged as experimental
33                 but is listed in version map
34                 Please add __rte_experimental to the definition of $SYM
35                 END_OF_MESSAGE
36                 exit 1
37         fi
38 done
39 exit 0
40