1#!/bin/sh 2# 3# aegis - project change supervisor 4# Copyright (C) 2004, 2006-2008 Peter Miller 5# 6# This program is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 3 of the License, or 9# (at your option) any later version. 10# 11# This program is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15# 16# You should have received a copy of the GNU General Public License 17# along with this program. If not, see 18# <http://www.gnu.org/licenses/>. 19# 20LANG=C 21export LANG 22 23LIBC=/usr/lib/libc.a 24LIBM=/usr/lib/libm.a 25 tmp=${TMP_DIR-/tmp}/$$ 26 obj="$*" 27 nm $LIBC $LIBM 2>/dev/null | 28 egrep ' [A-TXYZ] ' | awk '{print $3}' | sort -u > ${tmp}.a 29 nm $obj 2>/dev/null | 30 egrep ' [A-TXYZ] ' | awk '{print $3}' | sort -u > ${tmp}.b 31 common=`comm -12 ${tmp}.a ${tmp}.b` 32 rm ${tmp}.a ${tmp}.b 33 if test -n "$common" 34then 35 echo "The following reserved symbols have been used:" $common 36 for sym in $common 37 do 38 nm -A $obj 2>/dev/null | egrep " [A-TV-Z] $sym" 39 done 40 exit 1 41 fi 42exit 0 43