check_fnames.sh revision e8031f0a8ed0e45c6d8847c5e09424e66fd34a4b
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
STATUS=0
echo "usage: $CMD -s synonyms-file -l shared-lib object-file ..."
exit 1
}
# Add to the list of forbidden names from the shared library
if [ -f $1 ]
then
:
else
echo "$CMD: error: -l $1: non-existent file"
fi
then
:
else
echo "$CMD: error: -l $1: not a shared library"
fi
then
SUBDIR=/64
fi
# Generate the list of forbidden names from the shared library
$ELFDUMP -d $1 | $GREP SUNW_FILTER >>needed.$$
while read a b c NEEDED
do
/*) ;;
esac
then
fi
then
fi
done <needed.$$
addr1=""
name1=""
do
then
echo "$name1"
do
echo "$name2"
done
fi
}
# Add to the list of forbidden names from the synonyms file
if [ -f $1 ]
then
:
else
echo "$CMD: error: -s $1: non-existent file"
fi
do
echo $NAME
done >>forbid.$$
}
if [ $# -eq 0 ]
then
fi
>forbid.$$
while getopts l:s: ARG
do
;;
;;
\?) usage
;;
esac
done
then
fi
# Examine each object file, looking for forbidden names
for file
do
then
if [ ! -z "$LIST" ]
then
echo "$LIST"
STATUS=1
fi
else
STATUS=1
fi
done
exit $STATUS