aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub@94c539fb-cf18-0410-b60f-edeeb537fa16>2013-04-17 12:23:47 +0000
committerjakub <jakub@94c539fb-cf18-0410-b60f-edeeb537fa16>2013-04-17 12:23:47 +0000
commit8c9bd2f3b9524978555bd14eeb0ca3c1decce74e (patch)
treed2cb3dc9512e73033a25d0c11777cdb86cf94be2
parente785bc0cdd1fa9233f9f1dd62f3100ce9ce683d3 (diff)
downloadprelink-cross-8c9bd2f3b9524978555bd14eeb0ca3c1decce74e.tar.gz
prelink-cross-8c9bd2f3b9524978555bd14eeb0ca3c1decce74e.tar.bz2
prelink-cross-8c9bd2f3b9524978555bd14eeb0ca3c1decce74e.zip
* testsuite/ifunc.h (IFUNC_DECL): Fix up .size on ppc64.
* testsuite/cxx1.sh: Add libraries to link lines to make testsuite work both with --no-add-needed and with --add-needed, including latest ld.bfd. * testsuite/cxx2.sh: Likewise. * testsuite/cxx3.sh: Likewise. * testsuite/deps1.sh: Likewise. * testsuite/deps2.sh: Likewise. * testsuite/ifunc1.sh: Likewise. * testsuite/ifunc2.sh: Likewise. * testsuite/ifunc3.sh: Likewise. * testsuite/quick1.sh: Likewise. * testsuite/quick2.sh: Likewise. * testsuite/quick3.sh: Likewise. * testsuite/reloc1.sh: Likewise. * testsuite/reloc10.sh: Likewise. * testsuite/reloc11.sh: Likewise. * testsuite/reloc3.sh: Likewise. * testsuite/reloc6.sh: Likewise. * testsuite/reloc7.sh: Likewise. * testsuite/shuffle1.sh: Likewise. * testsuite/shuffle2.sh: Likewise. * testsuite/shuffle3.sh: Likewise. * testsuite/shuffle4.sh: Likewise. * testsuite/shuffle5.sh: Likewise. * testsuite/shuffle6.sh: Likewise. * testsuite/shuffle7.sh: Likewise. * testsuite/shuffle8.sh: Likewise. * testsuite/shuffle9.sh: Likewise. * testsuite/tls1.sh: Likewise. * testsuite/tls2.sh: Likewise. * testsuite/tls3.sh: Likewise. * testsuite/tls4.sh: Likewise. * testsuite/tls5.sh: Likewise. * testsuite/tls6.sh: Likewise. * testsuite/undo1.sh: Likewise. git-svn-id: http://sourceware.org/svn/prelink@201 94c539fb-cf18-0410-b60f-edeeb537fa16
-rw-r--r--trunk/ChangeLog39
-rwxr-xr-xtrunk/testsuite/cxx1.sh2
-rwxr-xr-xtrunk/testsuite/cxx2.sh2
-rwxr-xr-xtrunk/testsuite/cxx3.sh2
-rwxr-xr-xtrunk/testsuite/deps1.sh2
-rwxr-xr-xtrunk/testsuite/deps2.sh2
-rw-r--r--trunk/testsuite/ifunc.h2
-rwxr-xr-xtrunk/testsuite/ifunc1.sh2
-rwxr-xr-xtrunk/testsuite/ifunc2.sh2
-rwxr-xr-xtrunk/testsuite/ifunc3.sh2
-rwxr-xr-xtrunk/testsuite/quick1.sh8
-rwxr-xr-xtrunk/testsuite/quick2.sh8
-rwxr-xr-xtrunk/testsuite/quick3.sh2
-rwxr-xr-xtrunk/testsuite/reloc1.sh2
-rwxr-xr-xtrunk/testsuite/reloc10.sh5
-rwxr-xr-xtrunk/testsuite/reloc11.sh2
-rwxr-xr-xtrunk/testsuite/reloc3.sh2
-rwxr-xr-xtrunk/testsuite/reloc6.sh4
-rwxr-xr-xtrunk/testsuite/reloc7.sh2
-rwxr-xr-xtrunk/testsuite/shuffle1.sh4
-rwxr-xr-xtrunk/testsuite/shuffle2.sh4
-rwxr-xr-xtrunk/testsuite/shuffle3.sh4
-rwxr-xr-xtrunk/testsuite/shuffle4.sh2
-rwxr-xr-xtrunk/testsuite/shuffle5.sh4
-rwxr-xr-xtrunk/testsuite/shuffle6.sh4
-rwxr-xr-xtrunk/testsuite/shuffle7.sh4
-rwxr-xr-xtrunk/testsuite/shuffle8.sh2
-rwxr-xr-xtrunk/testsuite/shuffle9.sh2
-rwxr-xr-xtrunk/testsuite/tls1.sh2
-rwxr-xr-xtrunk/testsuite/tls2.sh2
-rwxr-xr-xtrunk/testsuite/tls3.sh2
-rwxr-xr-xtrunk/testsuite/tls4.sh2
-rwxr-xr-xtrunk/testsuite/tls5.sh2
-rwxr-xr-xtrunk/testsuite/tls6.sh2
-rwxr-xr-xtrunk/testsuite/undo1.sh2
35 files changed, 88 insertions, 48 deletions
diff --git a/trunk/ChangeLog b/trunk/ChangeLog
index 42d9765..b1c96b0 100644
--- a/trunk/ChangeLog
+++ b/trunk/ChangeLog
@@ -1,3 +1,42 @@
+2013-04-17 Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/ifunc.h (IFUNC_DECL): Fix up .size on ppc64.
+ * testsuite/cxx1.sh: Add libraries to link lines to make
+ testsuite work both with --no-add-needed and with --add-needed,
+ including latest ld.bfd.
+ * testsuite/cxx2.sh: Likewise.
+ * testsuite/cxx3.sh: Likewise.
+ * testsuite/deps1.sh: Likewise.
+ * testsuite/deps2.sh: Likewise.
+ * testsuite/ifunc1.sh: Likewise.
+ * testsuite/ifunc2.sh: Likewise.
+ * testsuite/ifunc3.sh: Likewise.
+ * testsuite/quick1.sh: Likewise.
+ * testsuite/quick2.sh: Likewise.
+ * testsuite/quick3.sh: Likewise.
+ * testsuite/reloc1.sh: Likewise.
+ * testsuite/reloc10.sh: Likewise.
+ * testsuite/reloc11.sh: Likewise.
+ * testsuite/reloc3.sh: Likewise.
+ * testsuite/reloc6.sh: Likewise.
+ * testsuite/reloc7.sh: Likewise.
+ * testsuite/shuffle1.sh: Likewise.
+ * testsuite/shuffle2.sh: Likewise.
+ * testsuite/shuffle3.sh: Likewise.
+ * testsuite/shuffle4.sh: Likewise.
+ * testsuite/shuffle5.sh: Likewise.
+ * testsuite/shuffle6.sh: Likewise.
+ * testsuite/shuffle7.sh: Likewise.
+ * testsuite/shuffle8.sh: Likewise.
+ * testsuite/shuffle9.sh: Likewise.
+ * testsuite/tls1.sh: Likewise.
+ * testsuite/tls2.sh: Likewise.
+ * testsuite/tls3.sh: Likewise.
+ * testsuite/tls4.sh: Likewise.
+ * testsuite/tls5.sh: Likewise.
+ * testsuite/tls6.sh: Likewise.
+ * testsuite/undo1.sh: Likewise.
+
2012-06-28 Jakub Jelinek <jakub@redhat.com>
* src/get.c (is_ldso_soname): Add arm dynamic linker SONAMEs.
diff --git a/trunk/testsuite/cxx1.sh b/trunk/testsuite/cxx1.sh
index 71ac75e..477a545 100755
--- a/trunk/testsuite/cxx1.sh
+++ b/trunk/testsuite/cxx1.sh
@@ -6,7 +6,7 @@ $CXX -shared -O2 -fpic -o cxx1lib1.so $srcdir/cxx1lib1.C
$CXX -shared -O2 -fpic -o cxx1lib2.so $srcdir/cxx1lib2.C cxx1lib1.so
BINS="cxx1"
LIBS="cxx1lib1.so cxx1lib2.so"
-$CXXLINK -o cxx1 $srcdir/cxx1.C -Wl,--rpath-link,. cxx1lib2.so
+$CXXLINK -o cxx1 $srcdir/cxx1.C -Wl,--rpath-link,. cxx1lib2.so cxx1lib1.so
savelibs
echo $PRELINK -vvvv ${PRELINK_OPTS--vm} ./cxx1 > cxx1.log
$PRELINK -vvvv ${PRELINK_OPTS--vm} ./cxx1 >> cxx1.log 2>&1 || exit 1
diff --git a/trunk/testsuite/cxx2.sh b/trunk/testsuite/cxx2.sh
index 164fe11..064fcb6 100755
--- a/trunk/testsuite/cxx2.sh
+++ b/trunk/testsuite/cxx2.sh
@@ -6,7 +6,7 @@ $CXX -shared -O2 -fpic -o cxx2lib1.so $srcdir/cxx1lib1.C
$CXX -shared -O2 -fpic -o cxx2lib2.so $srcdir/cxx1lib2.C cxx2lib1.so
BINS="cxx2"
LIBS="cxx2lib1.so cxx2lib2.so"
-$CXXLINK -o cxx2 $srcdir/cxx2.C -Wl,--rpath-link,. cxx2lib2.so
+$CXXLINK -o cxx2 $srcdir/cxx2.C -Wl,--rpath-link,. cxx2lib2.so cxx2lib1.so
savelibs
echo $PRELINK -vvvv ${PRELINK_OPTS--vm} ./cxx2 > cxx2.log
$PRELINK -vvvv ${PRELINK_OPTS--vm} ./cxx2 >> cxx2.log 2>&1 || exit 1
diff --git a/trunk/testsuite/cxx3.sh b/trunk/testsuite/cxx3.sh
index bc798a6..418369a 100755
--- a/trunk/testsuite/cxx3.sh
+++ b/trunk/testsuite/cxx3.sh
@@ -6,7 +6,7 @@ $CXX -shared -O2 -fpic -o cxx3lib1.so $srcdir/cxx3lib1.C
$CXX -shared -O2 -fpic -o cxx3lib2.so $srcdir/cxx3lib2.C cxx3lib1.so
BINS="cxx3"
LIBS="cxx3lib1.so cxx3lib2.so"
-$CXXLINK -o cxx3 $srcdir/cxx3.C -Wl,--rpath-link,. cxx3lib2.so
+$CXXLINK -o cxx3 $srcdir/cxx3.C -Wl,--rpath-link,. cxx3lib2.so cxx3lib1.so
savelibs
echo $PRELINK -vvvv ${PRELINK_OPTS--vm} ./cxx3 > cxx3.log
$PRELINK -vvvv ${PRELINK_OPTS--vm} ./cxx3 >> cxx3.log 2>&1 || exit 1
diff --git a/trunk/testsuite/deps1.sh b/trunk/testsuite/deps1.sh
index c345c07..b61a41d 100755
--- a/trunk/testsuite/deps1.sh
+++ b/trunk/testsuite/deps1.sh
@@ -25,7 +25,7 @@ for lib in `cat syslnk.list`; do
cp -dp $lib deps1.tree/lib
done
$CCLINK -o deps1.tree/usr/bin/bin1 $srcdir/deps1.c \
- -Wl,-rpath,deps1.tree/usr/lib -L deps1.tree/usr/lib -l3
+ -Wl,-rpath,deps1.tree/usr/lib -L deps1.tree/usr/lib -l3 -lc -l1 -l2
cat > deps1.tree/etc/prelink.conf <<EOF
deps1.tree/usr/bin
deps1.tree/lib
diff --git a/trunk/testsuite/deps2.sh b/trunk/testsuite/deps2.sh
index 636023c..0bcc21c 100755
--- a/trunk/testsuite/deps2.sh
+++ b/trunk/testsuite/deps2.sh
@@ -25,7 +25,7 @@ for lib in `cat syslnk.list`; do
cp -dp $lib deps2.tree/lib
done
$CCLINK -o deps2.tree/usr/bin/bin1 $srcdir/deps1.c \
- -Wl,-rpath,deps2.tree/usr/lib -L deps2.tree/usr/lib -l3
+ -Wl,-rpath,deps2.tree/usr/lib -L deps2.tree/usr/lib -l3 -lc -l1 -l2
cat > deps2.tree/etc/prelink.conf <<EOF
deps2.tree/usr/bin
deps2.tree/lib
diff --git a/trunk/testsuite/ifunc.h b/trunk/testsuite/ifunc.h
index 036444b..a1894b3 100644
--- a/trunk/testsuite/ifunc.h
+++ b/trunk/testsuite/ifunc.h
@@ -33,7 +33,7 @@ asm (".text\n" \
"\t.previous\n" \
".L." #name ":\n" \
IFUNC_ASM (PICK (fn1, fn2)) \
- "\t.size " #name ", .-" #name "\n")
+ "\t.size " #name ", .-.L" #name "\n")
# endif
#else
# error Architecture not supported
diff --git a/trunk/testsuite/ifunc1.sh b/trunk/testsuite/ifunc1.sh
index 7746234..135014d 100755
--- a/trunk/testsuite/ifunc1.sh
+++ b/trunk/testsuite/ifunc1.sh
@@ -9,7 +9,7 @@ $CC -shared -O2 -fpic -o ifunc1lib1.so $srcdir/ifunc1lib1.c
$CC -shared -O2 -fpic -o ifunc1lib2.so $srcdir/ifunc1lib2.c ifunc1lib1.so
BINS="ifunc1"
LIBS="ifunc1lib1.so ifunc1lib2.so"
-$CCLINK -o ifunc1 $srcdir/ifunc1.c -Wl,--rpath-link,. ifunc1lib2.so
+$CCLINK -o ifunc1 $srcdir/ifunc1.c -Wl,--rpath-link,. ifunc1lib2.so -lc ifunc1lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./ifunc1 >> ifunc1.log
$PRELINK ${PRELINK_OPTS--vm} ./ifunc1 >> ifunc1.log 2>&1 || exit 1
diff --git a/trunk/testsuite/ifunc2.sh b/trunk/testsuite/ifunc2.sh
index dea5bf4..3966e86 100755
--- a/trunk/testsuite/ifunc2.sh
+++ b/trunk/testsuite/ifunc2.sh
@@ -9,7 +9,7 @@ $CC -shared -O2 -fpic -o ifunc2lib1.so $srcdir/ifunc1lib1.c -DPICKNO=2
$CC -shared -O2 -fpic -o ifunc2lib2.so $srcdir/ifunc1lib2.c ifunc2lib1.so -DPICKNO=2
BINS="ifunc2"
LIBS="ifunc2lib1.so ifunc2lib2.so"
-$CCLINK -o ifunc2 $srcdir/ifunc1.c -Wl,--rpath-link,. ifunc2lib2.so -DPICKNO=2
+$CCLINK -o ifunc2 $srcdir/ifunc1.c -Wl,--rpath-link,. ifunc2lib2.so -lc ifunc2lib1.so -DPICKNO=2
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./ifunc2 >> ifunc2.log
$PRELINK ${PRELINK_OPTS--vm} ./ifunc2 >> ifunc2.log 2>&1 || exit 1
diff --git a/trunk/testsuite/ifunc3.sh b/trunk/testsuite/ifunc3.sh
index a54d4ec..30fc893 100755
--- a/trunk/testsuite/ifunc3.sh
+++ b/trunk/testsuite/ifunc3.sh
@@ -9,7 +9,7 @@ $CC -shared -O2 -fpic -o ifunc3lib1.so $srcdir/ifunc3lib1.c
$CC -shared -O2 -fpic -o ifunc3lib2.so $srcdir/ifunc1lib2.c ifunc3lib1.so
BINS="ifunc3"
LIBS="ifunc3lib1.so ifunc3lib2.so"
-$CCLINK -o ifunc3 $srcdir/ifunc3.c -Wl,--rpath-link,. ifunc3lib2.so
+$CCLINK -o ifunc3 $srcdir/ifunc3.c -Wl,--rpath-link,. ifunc3lib2.so -lc ifunc3lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./ifunc3 >> ifunc3.log
$PRELINK ${PRELINK_OPTS--vm} ./ifunc3 >> ifunc3.log 2>&1 || exit 1
diff --git a/trunk/testsuite/quick1.sh b/trunk/testsuite/quick1.sh
index 8974146..691b940 100755
--- a/trunk/testsuite/quick1.sh
+++ b/trunk/testsuite/quick1.sh
@@ -55,16 +55,16 @@ for lib in `cat syslnk.list`; do
cp -dp $lib quick1.tree/lib
done
$CCLINK -o quick1.tree/usr/bin/bin1 $srcdir/reloc1.c \
- -Wl,--rpath-link,quick1.tree/usr/lib -L quick1.tree/usr/lib -l2
+ -Wl,--rpath-link,quick1.tree/usr/lib -L quick1.tree/usr/lib -l2 -lc -l1
echo 'int main () { extern int foo; return foo; }' \
| $CCLINK -o quick1.tree/usr/bin/bin2 -xc - -xnone \
-L quick1.tree/usr/lib -l4
$CCLINK -o quick1.tree/usr/bin/bin3 $srcdir/reloc1.c \
- -Wl,--rpath-link,quick1.tree/usr/lib -L quick1.tree/usr/lib -l7
+ -Wl,--rpath-link,quick1.tree/usr/lib -L quick1.tree/usr/lib -l7 -lc -l2 -l1
$CCLINK -o quick1.tree/usr/bin/bin4 $srcdir/quick1.c \
- -Wl,--rpath-link,quick1.tree/usr/lib -L quick1.tree/usr/lib -l2
+ -Wl,--rpath-link,quick1.tree/usr/lib -L quick1.tree/usr/lib -l2 -lc -l1
$CCLINK -o quick1.tree/usr/bin/bin5 $srcdir/quick1.c \
- -Wl,--rpath-link,quick1.tree/usr/lib -L quick1.tree/usr/lib -l7
+ -Wl,--rpath-link,quick1.tree/usr/lib -L quick1.tree/usr/lib -l7 -lc -l2 -l1
echo 'int main () { return 0; }' \
| $CCLINK -o quick1.tree/usr/bin/bin6 -xc - -xnone \
-Wl,--rpath-link,quick1.tree/usr/lib -L quick1.tree/usr/lib -l6
diff --git a/trunk/testsuite/quick2.sh b/trunk/testsuite/quick2.sh
index b999786..031a410 100755
--- a/trunk/testsuite/quick2.sh
+++ b/trunk/testsuite/quick2.sh
@@ -57,16 +57,16 @@ for lib in `cat syslnk.list`; do
cp -dp $lib quick2.tree/lib
done
$CCLINK -o quick2.tree/usr/bin/bin1 $srcdir/reloc1.c \
- -Wl,--rpath-link,quick2.tree/usr/lib -L quick2.tree/usr/lib -l2
+ -Wl,--rpath-link,quick2.tree/usr/lib -L quick2.tree/usr/lib -l2 -lc -l1
echo 'int main () { extern int foo; return foo; }' \
| $CCLINK -o quick2.tree/usr/bin/bin2 -xc - -xnone \
-L quick2.tree/usr/lib -l4
$CCLINK -o quick2.tree/usr/bin/bin3 $srcdir/reloc1.c \
- -Wl,--rpath-link,quick2.tree/usr/lib -L quick2.tree/usr/lib -l7
+ -Wl,--rpath-link,quick2.tree/usr/lib -L quick2.tree/usr/lib -l7 -lc -l2 -l1
$CCLINK -o quick2.tree/usr/bin/bin4 $srcdir/quick1.c \
- -Wl,--rpath-link,quick2.tree/usr/lib -L quick2.tree/usr/lib -l2
+ -Wl,--rpath-link,quick2.tree/usr/lib -L quick2.tree/usr/lib -l2 -lc -l1
$CCLINK -o quick2.tree/usr/bin/bin5 $srcdir/quick1.c \
- -Wl,--rpath-link,quick2.tree/usr/lib -L quick2.tree/usr/lib -l7
+ -Wl,--rpath-link,quick2.tree/usr/lib -L quick2.tree/usr/lib -l7 -lc -l2 -l1
echo 'int main () { return 0; }' \
| $CCLINK -o quick2.tree/usr/bin/bin6 -xc - -xnone \
-Wl,--rpath-link,quick2.tree/usr/lib -L quick2.tree/usr/lib -l6
diff --git a/trunk/testsuite/quick3.sh b/trunk/testsuite/quick3.sh
index 00d2aad..1cdb523 100755
--- a/trunk/testsuite/quick3.sh
+++ b/trunk/testsuite/quick3.sh
@@ -43,7 +43,7 @@ for lib in `cat syslnk.list`; do
cp -dp $lib quick3.tree/lib
done
$CCLINK -o quick3.tree/usr/bin/bin1 $srcdir/reloc1.c \
- -Wl,--rpath-link,quick3.tree/usr/lib -L quick3.tree/usr/lib -l2
+ -Wl,--rpath-link,quick3.tree/usr/lib -L quick3.tree/usr/lib -l2 -lc -l1
cat > quick3.tree/etc/prelink.conf <<EOF
quick3.tree/usr/bin
quick3.tree/lib
diff --git a/trunk/testsuite/reloc1.sh b/trunk/testsuite/reloc1.sh
index 124ab96..5616d4e 100755
--- a/trunk/testsuite/reloc1.sh
+++ b/trunk/testsuite/reloc1.sh
@@ -6,7 +6,7 @@ $CC -shared -O2 -fpic -o reloc1lib1.so $srcdir/reloc1lib1.c
$CC -shared -O2 -fpic -o reloc1lib2.so $srcdir/reloc1lib2.c reloc1lib1.so
BINS="reloc1"
LIBS="reloc1lib1.so reloc1lib2.so"
-$CCLINK -o reloc1 $srcdir/reloc1.c -Wl,--rpath-link,. reloc1lib2.so
+$CCLINK -o reloc1 $srcdir/reloc1.c -Wl,--rpath-link,. reloc1lib2.so -lc reloc1lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./reloc1 > reloc1.log
$PRELINK ${PRELINK_OPTS--vm} ./reloc1 >> reloc1.log 2>&1 || exit 1
diff --git a/trunk/testsuite/reloc10.sh b/trunk/testsuite/reloc10.sh
index 94a4e69..03034c1 100755
--- a/trunk/testsuite/reloc10.sh
+++ b/trunk/testsuite/reloc10.sh
@@ -6,10 +6,11 @@ $CC -shared -O2 -fpic -o reloc10lib1.so $srcdir/reloc10lib1.c
$CC -shared -O2 -nostdlib -fpic -o reloc10lib2.so $srcdir/reloc10lib2.c reloc10lib1.so
$CC -shared -O2 -nostdlib -fpic -o reloc10lib3.so $srcdir/reloc10lib3.c reloc10lib1.so
$CC -shared -O2 -nostdlib -fpic -o reloc10lib4.so $srcdir/reloc10lib4.c reloc10lib1.so
-$CC -shared -O2 -fpic -o reloc10lib5.so $srcdir/reloc10lib5.c reloc10lib2.so reloc10lib3.so reloc10lib4.so
+$CC -shared -O2 -fpic -o reloc10lib5.so $srcdir/reloc10lib5.c -Wl,--rpath-link,. \
+ reloc10lib2.so reloc10lib3.so reloc10lib4.so
BINS="reloc10"
LIBS="reloc10lib1.so reloc10lib2.so reloc10lib3.so reloc10lib4.so reloc10lib5.so"
-$CCLINK -o reloc10 $srcdir/reloc10.c -Wl,--rpath-link,. reloc10lib5.so
+$CCLINK -o reloc10 $srcdir/reloc10.c -Wl,--rpath-link,. reloc10lib5.so -lc reloc10lib{2,3,4}.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./reloc10 > reloc10.log
$PRELINK ${PRELINK_OPTS--vm} ./reloc10 >> reloc10.log 2>&1 || exit 1
diff --git a/trunk/testsuite/reloc11.sh b/trunk/testsuite/reloc11.sh
index 5d3f4f1..fa0eab9 100755
--- a/trunk/testsuite/reloc11.sh
+++ b/trunk/testsuite/reloc11.sh
@@ -7,7 +7,7 @@ $CC -shared -O2 -nostdlib -fpic -o reloc11lib2.so $srcdir/reloc11lib2.c
$CC -shared -O2 -nostdlib -fpic -o reloc11lib3.so $srcdir/reloc11lib3.c reloc11lib2.so
BINS="reloc11"
LIBS="reloc11lib1.so reloc11lib2.so reloc11lib3.so"
-$CCLINK -o reloc11 $srcdir/reloc11.c -Wl,--rpath-link,. reloc11lib1.so reloc11lib3.so
+$CCLINK -o reloc11 $srcdir/reloc11.c -Wl,--rpath-link,. reloc11lib1.so reloc11lib3.so -lc reloc11lib2.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./reloc11 > reloc11.log
$PRELINK ${PRELINK_OPTS--vm} ./reloc11 >> reloc11.log 2>&1 || exit 1
diff --git a/trunk/testsuite/reloc3.sh b/trunk/testsuite/reloc3.sh
index 66e1bca..5941798 100755
--- a/trunk/testsuite/reloc3.sh
+++ b/trunk/testsuite/reloc3.sh
@@ -6,7 +6,7 @@ $CC -shared -O2 -fpic -o reloc3lib1.so $srcdir/reloc3lib1.c
$CC -shared -O2 -fpic -o reloc3lib2.so $srcdir/reloc1lib2.c reloc3lib1.so
BINS="reloc3"
LIBS="reloc3lib1.so reloc3lib2.so"
-$CCLINK -o reloc3 $srcdir/reloc3.c -Wl,--rpath-link,. reloc3lib2.so
+$CCLINK -o reloc3 $srcdir/reloc3.c -Wl,--rpath-link,. reloc3lib2.so -lc reloc3lib1.so
strip -g $BINS $LIBS
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./reloc3 > reloc3.log
diff --git a/trunk/testsuite/reloc6.sh b/trunk/testsuite/reloc6.sh
index 0ddd8d8..f2a5b17 100755
--- a/trunk/testsuite/reloc6.sh
+++ b/trunk/testsuite/reloc6.sh
@@ -4,8 +4,8 @@ rm -f reloc6 reloc6lib*.so reloc6.log
rm -f prelink.cache
$CC -shared -O2 -fpic -o reloc6lib1.so $srcdir/reloc3lib1.c
$CC -shared -O2 -fpic -o reloc6lib2.so $srcdir/reloc1lib2.c reloc6lib1.so
-$CCLINK -o reloc6 $srcdir/reloc3.c -Wl,--rpath-link,. reloc6lib2.so
-$CCLINK -o reloc6.nop $srcdir/reloc3.c -Wl,--rpath-link,. reloc6lib2.so
+$CCLINK -o reloc6 $srcdir/reloc3.c -Wl,--rpath-link,. reloc6lib2.so -lc reloc6lib1.so
+$CCLINK -o reloc6.nop $srcdir/reloc3.c -Wl,--rpath-link,. reloc6lib2.so -lc reloc6lib1.so
echo $PRELINK ${PRELINK_OPTS--vm} ./reloc6 > reloc6.log
$PRELINK ${PRELINK_OPTS--vm} ./reloc6 >> reloc6.log 2>&1 || exit 1
grep -q ^`echo $PRELINK | sed 's/ .*$/: /'` reloc6.log && exit 2
diff --git a/trunk/testsuite/reloc7.sh b/trunk/testsuite/reloc7.sh
index 640ca78..c7dab99 100755
--- a/trunk/testsuite/reloc7.sh
+++ b/trunk/testsuite/reloc7.sh
@@ -6,7 +6,7 @@ $CC -shared -O2 -Wl,-z,nocombreloc -fpic -o reloc7lib1.so $srcdir/reloc3lib1.c
$CC -shared -O2 -Wl,-z,nocombreloc -fpic -o reloc7lib2.so $srcdir/reloc1lib2.c reloc7lib1.so
BINS="reloc7"
LIBS="reloc7lib1.so reloc7lib2.so"
-$CCLINK -o reloc7 -Wl,-z,nocombreloc $srcdir/reloc7.c -Wl,--rpath-link,. reloc7lib2.so
+$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
$PRELINK ${PRELINK_OPTS--vm} ./reloc7 >> reloc7.log 2>&1 || exit 1
diff --git a/trunk/testsuite/shuffle1.sh b/trunk/testsuite/shuffle1.sh
index 7798d9e..61e596f 100755
--- a/trunk/testsuite/shuffle1.sh
+++ b/trunk/testsuite/shuffle1.sh
@@ -6,10 +6,10 @@ $CC -shared -O2 -fpic -o shuffle1lib1.so $srcdir/reloc1lib1.c
$CC -shared -O2 -fpic -o shuffle1lib2.so $srcdir/reloc1lib2.c shuffle1lib1.so
BINS="shuffle1"
LIBS="shuffle1lib1.so shuffle1lib2.so"
-$CCLINK -o shuffle1 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle1lib2.so \
+$CCLINK -o shuffle1 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle1lib2.so -lc shuffle1lib1.so \
-Wl,--verbose 2>&1 | sed -e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/0x08048000/0x08000000/;s/SIZEOF_HEADERS.*$/& . += 56;/' > shuffle1.lds
-$CCLINK -o shuffle1 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle1lib2.so \
+$CCLINK -o shuffle1 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle1lib2.so -lc shuffle1lib1.so \
-Wl,-T,shuffle1.lds
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./shuffle1 > shuffle1.log
diff --git a/trunk/testsuite/shuffle2.sh b/trunk/testsuite/shuffle2.sh
index fcfbfb1..953cea3 100755
--- a/trunk/testsuite/shuffle2.sh
+++ b/trunk/testsuite/shuffle2.sh
@@ -9,10 +9,10 @@ $CC -shared -O2 -fpic -o shuffle2lib1.so $srcdir/reloc1lib1.c
$CC -shared -O2 -fpic -o shuffle2lib2.so $srcdir/reloc1lib2.c shuffle2lib1.so
BINS="shuffle2"
LIBS="shuffle2lib1.so shuffle2lib2.so"
-$CCLINK -o shuffle2 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle2lib2.so \
+$CCLINK -o shuffle2 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle2lib2.so -lc shuffle2lib1.so \
-Wl,--verbose 2>&1 | sed -e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/0x08048000/0x08000000/;s/SIZEOF_HEADERS.*$/& . += 56;/' > shuffle2.lds
-$CCLINK -o shuffle2 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle2lib2.so \
+$CCLINK -o shuffle2 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle2lib2.so -lc shuffle2lib1.so \
-Wl,-T,shuffle2.lds
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./shuffle2 > shuffle2.log
diff --git a/trunk/testsuite/shuffle3.sh b/trunk/testsuite/shuffle3.sh
index d731102..534d174 100755
--- a/trunk/testsuite/shuffle3.sh
+++ b/trunk/testsuite/shuffle3.sh
@@ -10,10 +10,10 @@ $CC -shared -O2 -fpic -o shuffle3lib1.so $srcdir/reloc1lib1.c
$CC -shared -O2 -fpic -o shuffle3lib2.so $srcdir/reloc1lib2.c shuffle3lib1.so
BINS="shuffle3"
LIBS="shuffle3lib1.so shuffle3lib2.so"
-$CCLINK -o shuffle3 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle3lib2.so \
+$CCLINK -o shuffle3 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle3lib2.so -lc shuffle3lib1.so \
-Wl,--verbose 2>&1 | sed -e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/0x08048000/0x08000000/' > shuffle3.lds
-$CCLINK -o shuffle3 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle3lib2.so \
+$CCLINK -o shuffle3 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle3lib2.so -lc shuffle3lib1.so \
-Wl,-T,shuffle3.lds
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./shuffle3 > shuffle3.log
diff --git a/trunk/testsuite/shuffle4.sh b/trunk/testsuite/shuffle4.sh
index 127e224..398972a 100755
--- a/trunk/testsuite/shuffle4.sh
+++ b/trunk/testsuite/shuffle4.sh
@@ -6,7 +6,7 @@ case "`uname -r`" in
esac
rm -f shuffle4 shuffle4.log
BINS="shuffle4"
-$CCLINK -o shuffle4 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle3lib2.so
+$CCLINK -o shuffle4 $srcdir/shuffle2.c -Wl,--rpath-link,. shuffle3lib2.so -lc shuffle3lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./shuffle4 > shuffle4.log
$PRELINK ${PRELINK_OPTS--vm} ./shuffle4 >> shuffle4.log 2>&1 || exit 1
diff --git a/trunk/testsuite/shuffle5.sh b/trunk/testsuite/shuffle5.sh
index ce09d46..e8c0297 100755
--- a/trunk/testsuite/shuffle5.sh
+++ b/trunk/testsuite/shuffle5.sh
@@ -6,10 +6,10 @@ $CC -shared -O2 -fpic -o shuffle5lib1.so $srcdir/reloc1lib1.c
$CC -shared -O2 -fpic -o shuffle5lib2.so $srcdir/reloc1lib2.c shuffle5lib1.so
BINS="shuffle5"
LIBS="shuffle5lib1.so shuffle5lib2.so"
-$CCLINK -o shuffle5 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle5lib2.so \
+$CCLINK -o shuffle5 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle5lib2.so -lc shuffle5lib1.so \
-Wl,--verbose 2>&1 | sed -e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/0x08048000/0x08000000/;s/SIZEOF_HEADERS.*$/& . += 180;/' > shuffle5.lds
-$CCLINK -o shuffle5 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle5lib2.so \
+$CCLINK -o shuffle5 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle5lib2.so -lc shuffle5lib1.so \
-Wl,-T,shuffle5.lds
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./shuffle5 > shuffle5.log
diff --git a/trunk/testsuite/shuffle6.sh b/trunk/testsuite/shuffle6.sh
index 3eec2ff..cdd16a0 100755
--- a/trunk/testsuite/shuffle6.sh
+++ b/trunk/testsuite/shuffle6.sh
@@ -6,10 +6,10 @@ $CC -shared -O2 -fpic -o shuffle6lib1.so $srcdir/reloc1lib1.c
$CC -shared -O2 -fpic -o shuffle6lib2.so $srcdir/reloc1lib2.c shuffle6lib1.so
BINS="shuffle6"
LIBS="shuffle6lib1.so shuffle6lib2.so"
-$CCLINK -o shuffle6 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle6lib2.so \
+$CCLINK -o shuffle6 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle6lib2.so -lc shuffle6lib1.so \
-Wl,--verbose 2>&1 | sed -e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/0x08048000/0x08000000/;s/SIZEOF_HEADERS.*$/& . += 56;/' > shuffle6.lds
-$CCLINK -o shuffle6 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle6lib2.so \
+$CCLINK -o shuffle6 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle6lib2.so -lc shuffle6lib1.so \
-Wl,-T,shuffle6.lds
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./shuffle6 > shuffle6.log
diff --git a/trunk/testsuite/shuffle7.sh b/trunk/testsuite/shuffle7.sh
index 23c3c60..4250b26 100755
--- a/trunk/testsuite/shuffle7.sh
+++ b/trunk/testsuite/shuffle7.sh
@@ -6,11 +6,11 @@ $CC -shared -O2 -fpic -o shuffle7lib1.so $srcdir/reloc1lib1.c
$CC -shared -O2 -fpic -o shuffle7lib2.so $srcdir/reloc1lib2.c shuffle7lib1.so
BINS="shuffle7"
LIBS="shuffle7lib1.so shuffle7lib2.so"
-$CCLINK -o shuffle7 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle7lib2.so \
+$CCLINK -o shuffle7 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle7lib2.so -lc shuffle7lib1.so \
-Wl,--verbose 2>&1 | sed -e '/^=========/,/^=========/!d;/^=========/d' \
-e '/\.hash/a\
. = . + 0x300;' > shuffle7.lds
-$CCLINK -o shuffle7 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle7lib2.so \
+$CCLINK -o shuffle7 $srcdir/reloc1.c -Wl,--rpath-link,. shuffle7lib2.so -lc shuffle7lib1.so \
-Wl,-T,shuffle7.lds
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./shuffle7 > shuffle7.log
diff --git a/trunk/testsuite/shuffle8.sh b/trunk/testsuite/shuffle8.sh
index d0768a4..7875673 100755
--- a/trunk/testsuite/shuffle8.sh
+++ b/trunk/testsuite/shuffle8.sh
@@ -6,7 +6,7 @@ $CC -shared -O2 -fpic -o shuffle8lib1.so $srcdir/reloc1lib1.c
$CC -shared -O2 -fpic -o shuffle8lib2.so $srcdir/reloc1lib2.c shuffle8lib1.so
BINS="shuffle8"
LIBS="shuffle8lib1.so shuffle8lib2.so"
-$CCLINK -o shuffle8 $srcdir/shuffle8.c -Wl,--rpath-link,. shuffle8lib2.so
+$CCLINK -o shuffle8 $srcdir/shuffle8.c -Wl,--rpath-link,. shuffle8lib2.so -lc shuffle8lib1.so
strip -R .comment shuffle8
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./shuffle8 > shuffle8.log
diff --git a/trunk/testsuite/shuffle9.sh b/trunk/testsuite/shuffle9.sh
index 5768890..c974708 100755
--- a/trunk/testsuite/shuffle9.sh
+++ b/trunk/testsuite/shuffle9.sh
@@ -6,7 +6,7 @@ case "`uname -r`" in
esac
rm -f shuffle9 shuffle9.log
BINS="shuffle9"
-$CCLINK -o shuffle9 $srcdir/shuffle9.c -Wl,--rpath-link,. shuffle3lib2.so
+$CCLINK -o shuffle9 $srcdir/shuffle9.c -Wl,--rpath-link,. shuffle3lib2.so -lc shuffle3lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./shuffle9 > shuffle9.log
$PRELINK ${PRELINK_OPTS--vm} ./shuffle9 >> shuffle9.log 2>&1 || exit 1
diff --git a/trunk/testsuite/tls1.sh b/trunk/testsuite/tls1.sh
index 0fb4986..585d179 100755
--- a/trunk/testsuite/tls1.sh
+++ b/trunk/testsuite/tls1.sh
@@ -11,7 +11,7 @@ $CC -shared -O2 -fpic -o tls1lib1.so $srcdir/tls1lib1.c
$CC -shared -O2 -fpic -o tls1lib2.so $srcdir/tls1lib2.c tls1lib1.so
BINS="tls1"
LIBS="tls1lib1.so tls1lib2.so"
-$CCLINK -o tls1 $srcdir/tls1.c -Wl,--rpath-link,. tls1lib2.so
+$CCLINK -o tls1 $srcdir/tls1.c -Wl,--rpath-link,. tls1lib2.so -lc tls1lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./tls1 > tls1.log
$PRELINK ${PRELINK_OPTS--vm} ./tls1 >> tls1.log 2>&1 || exit 1
diff --git a/trunk/testsuite/tls2.sh b/trunk/testsuite/tls2.sh
index bf9e1eb..6910c16 100755
--- a/trunk/testsuite/tls2.sh
+++ b/trunk/testsuite/tls2.sh
@@ -11,7 +11,7 @@ $CC -shared -O2 -fpic -o tls2lib1.so $srcdir/tls2lib1.c
$CC -shared -O2 -fpic -o tls2lib2.so $srcdir/tls1lib2.c tls2lib1.so
BINS="tls2"
LIBS="tls2lib1.so tls2lib2.so"
-$CCLINK -o tls2 $srcdir/tls2.c -Wl,--rpath-link,. tls2lib2.so
+$CCLINK -o tls2 $srcdir/tls2.c -Wl,--rpath-link,. tls2lib2.so -lc tls2lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./tls2 > tls2.log
$PRELINK ${PRELINK_OPTS--vm} ./tls2 >> tls2.log 2>&1 || exit 1
diff --git a/trunk/testsuite/tls3.sh b/trunk/testsuite/tls3.sh
index 00dde00..951ee55 100755
--- a/trunk/testsuite/tls3.sh
+++ b/trunk/testsuite/tls3.sh
@@ -23,7 +23,7 @@ $CC -shared -O2 $SHFLAGS -o tls3lib2.so $srcdir/tls3lib2.c \
tls3lib1.so 2>/dev/null
BINS="tls3"
LIBS="tls3lib1.so tls3lib2.so"
-$CCLINK -o tls3 $srcdir/tls1.c -Wl,--rpath-link,. tls3lib2.so
+$CCLINK -o tls3 $srcdir/tls1.c -Wl,--rpath-link,. tls3lib2.so -lc tls3lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./tls3 > tls3.log
$PRELINK ${PRELINK_OPTS--vm} ./tls3 >> tls3.log 2>&1 || exit 1
diff --git a/trunk/testsuite/tls4.sh b/trunk/testsuite/tls4.sh
index 556a6d5..e00e7cc 100755
--- a/trunk/testsuite/tls4.sh
+++ b/trunk/testsuite/tls4.sh
@@ -12,7 +12,7 @@ $CC -shared -O2 -fpic -o tls4lib2.so $srcdir/tls4lib2.c \
tls4lib1.so 2>/dev/null
BINS="tls4"
LIBS="tls4lib1.so tls4lib2.so"
-$CCLINK -o tls4 $srcdir/tls4.c -Wl,--rpath-link,. tls4lib2.so
+$CCLINK -o tls4 $srcdir/tls4.c -Wl,--rpath-link,. tls4lib2.so -lc tls4lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./tls4 > tls4.log
$PRELINK ${PRELINK_OPTS--vm} ./tls4 >> tls4.log 2>&1 || exit 1
diff --git a/trunk/testsuite/tls5.sh b/trunk/testsuite/tls5.sh
index dbc0470..7282808 100755
--- a/trunk/testsuite/tls5.sh
+++ b/trunk/testsuite/tls5.sh
@@ -13,7 +13,7 @@ $CC -shared -O2 -fpic -o tls5lib2.so $srcdir/tls1lib2.c \
-Wl,--rpath-link,. tls5lib1.so
BINS="tls5"
LIBS="tls5lib1.so tls5lib2.so tls5lib3.so"
-$CCLINK -o tls5 $srcdir/tls1.c -Wl,--rpath-link,. tls5lib2.so
+$CCLINK -o tls5 $srcdir/tls1.c -Wl,--rpath-link,. tls5lib2.so -lc tls5lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./tls5 > tls5.log
$PRELINK ${PRELINK_OPTS--vm} ./tls5 >> tls5.log 2>&1 || exit 1
diff --git a/trunk/testsuite/tls6.sh b/trunk/testsuite/tls6.sh
index 2d854d9..6a64f02 100755
--- a/trunk/testsuite/tls6.sh
+++ b/trunk/testsuite/tls6.sh
@@ -13,7 +13,7 @@ $CC -shared -O2 -fpic -o tls6lib2.so $srcdir/tls1lib2.c \
-Wl,--rpath-link,. tls6lib1.so
BINS="tls6"
LIBS="tls6lib1.so tls6lib2.so tls6lib3.so"
-$CCLINK -o tls6 $srcdir/tls2.c -Wl,--rpath-link,. tls6lib2.so
+$CCLINK -o tls6 $srcdir/tls2.c -Wl,--rpath-link,. tls6lib2.so -lc tls6lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./tls6 > tls6.log
$PRELINK ${PRELINK_OPTS--vm} ./tls6 >> tls6.log 2>&1 || exit 1
diff --git a/trunk/testsuite/undo1.sh b/trunk/testsuite/undo1.sh
index d8436a5..68eee1f 100755
--- a/trunk/testsuite/undo1.sh
+++ b/trunk/testsuite/undo1.sh
@@ -6,7 +6,7 @@ $CC -shared -O2 -fpic -o undo1lib1.so $srcdir/reloc1lib1.c
$CC -shared -O2 -fpic -o undo1lib2.so $srcdir/reloc1lib2.c undo1lib1.so
BINS="undo1"
LIBS="undo1lib1.so undo1lib2.so"
-$CCLINK -o undo1 $srcdir/reloc1.c -Wl,--rpath-link,. undo1lib2.so
+$CCLINK -o undo1 $srcdir/reloc1.c -Wl,--rpath-link,. undo1lib2.so -lc undo1lib1.so
savelibs
echo $PRELINK ${PRELINK_OPTS--vm} ./undo1 > undo1.log
$PRELINK ${PRELINK_OPTS--vm} ./undo1 >> undo1.log 2>&1 || exit 1