summaryrefslogtreecommitdiffstats
path: root/trunk/testsuite/reloc5.sh
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/testsuite/reloc5.sh')
-rwxr-xr-xtrunk/testsuite/reloc5.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/trunk/testsuite/reloc5.sh b/trunk/testsuite/reloc5.sh
new file mode 100755
index 0000000..f543f69
--- /dev/null
+++ b/trunk/testsuite/reloc5.sh
@@ -0,0 +1,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