Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | #!/bin/sh |
2 | ### quick sanity test for the binutils. | |
3 | ### | |
4 | ### This file was written and is maintained by K. Richard Pixley, | |
5 | ### rich@cygnus.com. | |
6 | ||
7 | ### fail on errors | |
8 | set -e | |
9 | ||
10 | ### first arg is directory in which binaries to be tested reside. | |
11 | case "$1" in | |
12 | "") BIN=. ;; | |
13 | *) BIN="$1" ;; | |
14 | esac | |
15 | ||
16 | ### size | |
17 | for i in size objdump nm ar strip ranlib ; do | |
18 | ${BIN}/size ${BIN}/$i > /dev/null | |
19 | done | |
20 | ||
21 | ### objdump | |
22 | for i in size objdump nm ar strip ranlib ; do | |
23 | ${BIN}/objdump -ahifdrtxsl ${BIN}/$i > /dev/null | |
24 | done | |
25 | ||
26 | ### nm | |
27 | for i in size objdump nm ar strip ranlib ; do | |
28 | ${BIN}/nm ${BIN}/$i > /dev/null | |
29 | done | |
30 | ||
31 | ### strip | |
32 | TMPDIR=./binutils-$$ | |
33 | mkdir ${TMPDIR} | |
34 | ||
35 | cp ${BIN}/strip ${TMPDIR}/strip | |
36 | ||
37 | for i in size objdump nm ar ranlib ; do | |
38 | cp ${BIN}/$i ${TMPDIR}/$i | |
39 | ${BIN}/strip ${TMPDIR}/$i | |
40 | cp ${BIN}/$i ${TMPDIR}/$i | |
41 | ${TMPDIR}/strip ${TMPDIR}/$i | |
42 | done | |
43 | ||
44 | ### ar | |
45 | ||
46 | ### ranlib | |
47 | ||
48 | rm -rf ${TMPDIR} | |
49 | ||
50 | exit 0 |