56ea803e87
Rather than have two files that keeps getting out of sync, let's annotate the version.map to generate the Windows export file. Some mlx5 symbols (haswell_broadwell_cpu, mlx5_glue, mlx5_os_*) were only exported for Windows. All of them are available and used by Linux too, so this patch adds them in version.map. Note: Existing version.map annotation achieved with: $ for dir in lib/librte_eal drivers/common/mlx5; do ./buildtools/map-list-symbol.sh $dir/*.map | while read file version sym; do ! git grep -qw $sym $dir/*.def || continue; sed -i -e "s/$sym;/$sym; # WINDOWS_NO_EXPORT/" $dir/*.map; done; done Signed-off-by: David Marchand <david.marchand@redhat.com> Tested-by: Tal Shnaiderman <talshn@nvidia.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
39 lines
947 B
Bash
Executable File
39 lines
947 B
Bash
Executable File
#! /bin/sh -e
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright 2018 Mellanox Technologies, Ltd
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
# speed up by ignoring Unicode details
|
|
export LC_ALL=C
|
|
|
|
ret=0
|
|
|
|
find_orphan_symbols ()
|
|
{
|
|
for map in $(find lib drivers -name '*.map') ; do
|
|
for sym in $(sed -rn 's,^([^}]*_.*);.*$,\1,p' $map) ; do
|
|
if echo $sym | grep -q '^per_lcore_' ; then
|
|
symsrc=${sym#per_lcore_}
|
|
elif echo $sym | grep -q '^__rte_.*_trace_' ; then
|
|
symsrc=${sym#__}
|
|
else
|
|
symsrc=$sym
|
|
fi
|
|
if ! grep -q -r --exclude=$(basename $map) \
|
|
-w $symsrc $(dirname $map) ; then
|
|
echo "$map: $sym"
|
|
fi
|
|
done
|
|
done
|
|
}
|
|
|
|
orphan_symbols=$(find_orphan_symbols)
|
|
if [ -n "$orphan_symbols" ] ; then
|
|
echo "Found only in symbol map file:"
|
|
echo "$orphan_symbols" | sed 's,^,\t,'
|
|
ret=1
|
|
fi
|
|
|
|
exit $ret
|