summaryrefslogtreecommitdiffstats
path: root/trunk/testsuite/reloc5.sh
blob: f543f69b392a0e385f12dafc0589e09542f8bf11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
. `dirname $0`/functions.sh
# This test takes a lot of time, so skip it normally
[ -z "$CHECK_ME_HARDER" ] && exit 77
rm -f reloc5 reloc5.log
rm -f prelink.cache
$HOST_CC -O2 -o reloc5.tmp $srcdir/reloc5.c
./reloc5.tmp > reloc5.tmp.c
BINS="reloc5"
$CCLINK -o reloc5 reloc5.tmp.c -Wl,--rpath-link,. reloc4lib3.so
savelibs
rm -f reloc5*.tmp reloc5*.tmp.c
echo $PRELINK ${PRELINK_OPTS--vm} ./reloc5 > reloc5.log
$PRELINK ${PRELINK_OPTS--vm} ./reloc5 >> reloc5.log 2>&1 || exit 1
grep -q ^`echo $PRELINK | sed 's/ .*$/: /'` reloc5.log && exit 2
if [ "x$CROSS" = "x" ]; then
 LD_LIBRARY_PATH=. ./reloc5 || exit 3
fi
readelf -a ./reloc5 >> reloc5.log 2>&1 || exit 4
# So that it is not prelinked again
chmod -x ./reloc5
comparelibs >> reloc5.log 2>&1 || exit 5