Files
rk35xx-android14/external/libcups/scripts/checkglobals
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

33 lines
537 B
Bash
Executable File

#!/bin/sh
#
# Check for global symbols that don't need to be made global...
#
for file in *.o; do
functions=""
for function in `nm -g $file | grep "T " | awk '{print $3}'`; do
found=""
for file2 in *.o; do
if test "$file" = "$file2"; then
continue;
fi
found=`nm -g $file2 | grep $function`
if test "$found" != ""; then
break;
fi
done
if test -z "$found"; then
functions="$functions $function"
fi
done
if test -z "$functions"; then
echo "$file: OK"
else
echo "$file: $functions"
fi
done