cmpliball
1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/sh
#
# script to compare library in asm level
#
# cmplib [ROOTpath1] [ROOTpath2]
#
if test $# -gt 0
then
if test $1 = "-h" ; then
echo "cmpliball [ROOTpath1] [ROOTpath2 (default:\$ROOT)]" ; exit 1
else
PRDIR1=$1 ; fi
else
PRDIR1="/hosts/cocaine/usr/people/nightly/mdev2" ;fi
if test $# -gt 1
then PRDIR2=$2
else PRDIR2=$ROOT
fi
if test ! -d $PRDIR1 ;then
echo $PRDIR1 is not a directory ; exit 0 ; fi
if test ! -d $PRDIR2 ;then
echo $PRDIR2 is not a directory ; exit 0 ; fi
liblist="\
libleo/libleo_d/libleo_d.a \
libleo/libleo/libleo.a \
libleo/libddwrite/libddwrite.a \
libleo/libleowriter/libleowriter.a \
libultra/libultra/libultra.a \
libultra/libultra_d/libultra_d.a \
libultra/libultra_rom/libultra_rom.a \
"
#echo $liblist
for libname in $liblist
do
FILE1=$PRDIR1/PR/$libname
FILE2=$PRDIR2/PR/$libname
if test ! -r $FILE1 ;then
echo $FILE1 is not found
STRBUF="$STRBUF$libname skip !\n"
else
STRBUF="$STRBUF$libname success !\n" ;fi
if test ! -r $FILE2 ;then echo $FILE2 is not found ;fi
echo "in $libname"
OBJS=`ar t $FILE1`
ar x $FILE1
for OBJ in $OBJS ; do gdis $OBJ >$OBJ.tmp1 ;done
OBJS=`ar t $FILE2`
ar x $FILE2
for OBJ in $OBJS ; do gdis $OBJ >$OBJ.tmp2 ;done
for OBJ in $OBJS
do
if test "`diff $OBJ.tmp1 $OBJ.tmp2`" ;then
echo " $OBJ \t:unmatch!"
diff $OBJ.tmp1 $OBJ.tmp2 > lastdiff.error
exit 0
else
echo " $OBJ \t:match"
rm -f $OBJ.tmp1 $OBJ.tmp2 $OBJ
fi
done
done
echo $STRBUF
echo "conglatulations! v(^_^)v"