aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/reloc7.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/reloc7.sh')
-rwxr-xr-xtestsuite/reloc7.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/reloc7.sh b/testsuite/reloc7.sh
new file mode 100755
index 0000000..a3dcaf6
--- /dev/null
+++ b/testsuite/reloc7.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+. `dirname $0`/functions.sh
+rm -f reloc7 reloc7lib*.so reloc7.log
+rm -f prelink.cache
+$RUN_HOST $CC -shared -O2 -Wl,-z,nocombreloc -fpic -o reloc7lib1.so $srcdir/reloc3lib1.c
+$RUN_HOST $CC -shared -O2 -Wl,-z,nocombreloc -fpic -o reloc7lib2.so $srcdir/reloc1lib2.c reloc7lib1.so
+BINS="reloc7"
+LIBS="reloc7lib1.so reloc7lib2.so"
+$RUN_HOST $CCLINK -o reloc7 -Wl,-z,nocombreloc $srcdir/reloc7.c -Wl,--rpath-link,. reloc7lib2.so -lc reloc7lib1.so
+savelibs
+echo $PRELINK ${PRELINK_OPTS--vm} ./reloc7 > reloc7.log
+$RUN_HOST $PRELINK ${PRELINK_OPTS--vm} ./reloc7 >> reloc7.log 2>&1 || exit 1
+grep -q ^`echo $PRELINK | sed 's/ .*$/: /'` reloc7.log && exit 2
+if [ "x$CROSS" = "x" ]; then
+ $RUN LD_LIBRARY_PATH=. ./reloc7 >> reloc7.log || exit 3
+fi
+$RUN_HOST $READELF -a ./reloc7 >> reloc7.log 2>&1 || exit 4
+# So that it is not prelinked again
+chmod -x ./reloc7
+comparelibs >> reloc7.log 2>&1 || exit 5