F: devtools/validate-abi.sh
F: devtools/check-symbol-change.sh
F: buildtools/check-experimental-syms.sh
+F: buildtools/map-list-symbol.sh
Driver information
M: Neil Horman <nhorman@tuxdriver.com>
MAPFILE=$1
OBJFILE=$2
+LIST_SYMBOL=$RTE_SDK/buildtools/map-list-symbol.sh
+
# added check for "make -C test/" usage
if [ ! -e $MAPFILE ] || [ ! -f $OBJFILE ]
then
exit 0
fi
-for i in `awk 'BEGIN {found=0}
- /.*EXPERIMENTAL.*/ {found=1}
- /.*}.*;/ {found=0}
- /.*;/ {if (found == 1) print $1}' $MAPFILE`
+ret=0
+for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE`
do
- SYM=`echo $i | sed -e"s/;//"`
objdump -t $OBJFILE | grep -q "\.text.*$SYM$"
IN_TEXT=$?
objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM$"
but is listed in version map
Please add __rte_experimental to the definition of $SYM
END_OF_MESSAGE
- exit 1
+ ret=1
fi
done
-exit 0
+for SYM in `objdump -t $OBJFILE |awk '{
+ if ($2 != "l" && $4 == ".text.experimental") {
+ print $NF
+ }
+}'`
+do
+ $LIST_SYMBOL -S EXPERIMENTAL -s $SYM -q $MAPFILE || {
+ cat >&2 <<- END_OF_MESSAGE
+ $SYM is flagged as experimental
+ but is not listed in version map
+ Please add $SYM to the version map
+ END_OF_MESSAGE
+ ret=1
+ }
+done
+
+exit $ret
--- /dev/null
+#!/bin/sh
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2018 David Marchand <david.marchand@redhat.com>
+
+section=all
+symbol=all
+quiet=
+
+while getopts 'S:s:q' name; do
+ case $name in
+ S)
+ [ $section = 'all' ] || {
+ echo 'Cannot list in multiple sections'
+ exit 1
+ }
+ section=$OPTARG
+ ;;
+ s)
+ [ $symbol = 'all' ] || {
+ echo 'Cannot list multiple symbols'
+ exit 1
+ }
+ symbol=$OPTARG
+ ;;
+ q)
+ quiet='y'
+ ;;
+ ?)
+ echo 'usage: $0 [-S section] [-s symbol] [-q]'
+ exit 1
+ ;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+for file in $@; do
+ cat "$file" |awk '
+ BEGIN {
+ current_section = "";
+ if ("'$section'" == "all" && "'$symbol'" == "all") {
+ ret = 0;
+ } else {
+ ret = 1;
+ }
+ }
+ /^.*{/ {
+ if ("'$section'" == "all" || $1 == "'$section'") {
+ current_section = $1;
+ }
+ }
+ /.*}/ { current_section = ""; }
+ /^[^}].*[^:*];/ {
+ if (current_section != "") {
+ gsub(";","");
+ if ("'$symbol'" == "all" || $1 == "'$symbol'") {
+ ret = 0;
+ if ("'$quiet'" == "") {
+ print "'$file' "current_section" "$1;
+ }
+ if ("'$symbol'" != "all") {
+ exit 0;
+ }
+ }
+ }
+ }
+ END {
+ exit ret;
+ }'
+done