3 # SPDX-License-Identifier: BSD-3-Clause
8 LIST_SYMBOL=$(dirname $(readlink -f $0))/map-list-symbol.sh
10 # added check for "make -C test/" usage
11 if [ ! -e $MAPFILE ] || [ ! -f $OBJFILE ]
21 DUMPFILE=$(mktemp -t dpdk.${0##*/}.XXX.objdump)
22 trap 'rm -f "$DUMPFILE"' EXIT
23 objdump -t $OBJFILE >$DUMPFILE
26 for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE |cut -d ' ' -f 3`
28 if grep -q "\.text.*[[:space:]]$SYM$" $DUMPFILE &&
29 ! grep -q "\.text\.experimental.*[[:space:]]$SYM$" $DUMPFILE &&
30 $LIST_SYMBOL -s $SYM $MAPFILE | grep -q EXPERIMENTAL
32 cat >&2 <<- END_OF_MESSAGE
33 $SYM is not flagged as experimental
34 but is listed in version map
35 Please add __rte_experimental to the definition of $SYM
41 # Filter out symbols suffixed with a . for icc
43 if ($2 != "l" && $4 == ".text.experimental" && !($NF ~ /\.$/)) {
48 $LIST_SYMBOL -S EXPERIMENTAL -s $SYM -q $MAPFILE || {
49 cat >&2 <<- END_OF_MESSAGE
50 $SYM is flagged as experimental
51 but is not listed in version map
52 Please add $SYM to the version map
58 for SYM in `$LIST_SYMBOL -S INTERNAL $MAPFILE |cut -d ' ' -f 3`
60 if grep -q "\.text.*[[:space:]]$SYM$" $DUMPFILE &&
61 ! grep -q "\.text\.internal.*[[:space:]]$SYM$" $DUMPFILE
63 cat >&2 <<- END_OF_MESSAGE
64 $SYM is not flagged as internal
65 but is listed in version map
66 Please add __rte_internal to the definition of $SYM
72 # Filter out symbols suffixed with a . for icc
74 if ($2 != "l" && $4 == ".text.internal" && !($NF ~ /\.$/)) {
79 $LIST_SYMBOL -S INTERNAL -s $SYM -q $MAPFILE || {
80 cat >&2 <<- END_OF_MESSAGE
81 $SYM is flagged as internal
82 but is not listed in version map
83 Please add $SYM to the version map