From 66517a2f18e2cbae1a861b138ce9372fff501f2c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 6 Jun 2001 21:03:59 +0000 Subject: [PATCH] 2001-06-06 H.J. Lu * ld-bootstrap/bootstrap.exp: Rebuild tmpdir/ld2 with tmpdir/ld3 on Linux/mips. * ld-elfvers/vers.exp: Also run on istarget Linux/mips. * ld-elfvsb/elfvsb.exp: Likewise. * ld-shared/shared.exp: Likewise. * ld-selective/selective.exp: Mark selective2, selective3, selective4 and selective5 xfail on Linux/mips. * ld-shared/main.c: Skip invalid -Bsymbolic tests on Linux/mips. * symbolic.dat: Remove invalid -Bsymbolic tests on Linux/mips. * ld-srec/srec.exp: Add Linux/mips to xfail. --- ld/testsuite/ChangeLog | 18 ++++++++++++++++++ ld/testsuite/ld-bootstrap/bootstrap.exp | 10 ++++++++++ ld/testsuite/ld-elfvers/vers.exp | 1 + ld/testsuite/ld-elfvsb/elfvsb.exp | 2 ++ ld/testsuite/ld-selective/selective.exp | 8 ++++---- ld/testsuite/ld-shared/main.c | 2 ++ ld/testsuite/ld-shared/shared.exp | 6 ++++-- ld/testsuite/ld-shared/symbolic.dat | 2 -- ld/testsuite/ld-srec/srec.exp | 4 ++-- 9 files changed, 43 insertions(+), 10 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 2933c8ddd1c..2d164bb8b60 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,21 @@ +2001-06-06 H.J. Lu + + * ld-bootstrap/bootstrap.exp: Rebuild tmpdir/ld2 with tmpdir/ld3 + on Linux/mips. + + * ld-elfvers/vers.exp: Also run on istarget Linux/mips. + * ld-elfvsb/elfvsb.exp: Likewise. + * ld-shared/shared.exp: Likewise. + + * ld-selective/selective.exp: Mark selective2, selective3, + selective4 and selective5 xfail on Linux/mips. + + * ld-shared/main.c: Skip invalid -Bsymbolic tests on Linux/mips. + + * symbolic.dat: Remove invalid -Bsymbolic tests on Linux/mips. + + * ld-srec/srec.exp: Add Linux/mips to xfail. + 2001-06-06 Martin Schwidefsky * ld-undefined/undefined.exp: Add a setup_xfail line for a test diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp index af858da4da7..6eb40a27874 100644 --- a/ld/testsuite/ld-bootstrap/bootstrap.exp +++ b/ld/testsuite/ld-bootstrap/bootstrap.exp @@ -115,6 +115,16 @@ foreach flags {"" "strip" "--static" "--traditional-format" "--no-keep-memory"} continue } } + } else { + if { [istarget mips*-*-linux*] } { + # On Linux/mips, tmpdir/ld2 != tmpdir/ld3 is normal since + # they are generated by different linkers, tmpdir/ld1 and + # tmpdir/ld2. So we rebuild tmpdir/ld2 with tmpdir/ld3. + if ![ld_link tmpdir/ld3 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY"] { + fail $testname + continue + } + } } send_log "cmp tmpdir/ld2 tmpdir/ld3\n" diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index 3f1006c6e44..c4b78921d8c 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -40,6 +40,7 @@ if { ![istarget i?86-*-sysv4*] \ && ![istarget sparc*-*-solaris2*] \ && ![istarget sparc*-*-linux*] \ && ![istarget arm*-*-linux*] \ + && ![istarget mips*-*-linux*] \ && ![istarget alpha*-*-linux*] } { return } diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp index aa3fddf61cb..6f8f2b1b563 100644 --- a/ld/testsuite/ld-elfvsb/elfvsb.exp +++ b/ld/testsuite/ld-elfvsb/elfvsb.exp @@ -29,6 +29,7 @@ if ![isnative] then {return} if { ![istarget i?86-*-linux*] \ && ![istarget ia64-*-linux*] \ && ![istarget m68k-*-linux*] \ + && ![istarget mips*-*-linux*] \ && ![istarget powerpc-*-linux*] \ && ![istarget arm*-*-linux*] \ && ![istarget alpha*-*-linux*] \ @@ -266,6 +267,7 @@ proc visibility_run {visibility} { if { ![ string match $visibility "hidden_undef" ] && ![ string match $visibility "protected_undef" ] } { setup_xfail "ia64-*-linux*" + setup_xfail "mips*-*-linux*" } visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \ mainnp.o sh1np.o sh2np.o elfvsb \ diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp index dd285481dd9..5b10ea331a6 100644 --- a/ld/testsuite/ld-selective/selective.exp +++ b/ld/testsuite/ld-selective/selective.exp @@ -39,10 +39,10 @@ if {[istarget "*-*-pe"]} { # FIXME: Instead of table, read settings from each source-file. set seltests { {selective1 C 1.c {} {} {dropme1 dropme2} {}} - {selective2 C 2.c {} {} {foo} {}} - {selective3 C 2.c {-u foo} {foo} {{foo 0}} {}} - {selective4 C++ 3.cc {} {start foo__1A foo__1B} {bar__1A} {}} - {selective5 C++ 4.cc {} {} {foo__1B foo__1A} {}} + {selective2 C 2.c {} {} {foo} {mips*-*}} + {selective3 C 2.c {-u foo} {foo} {{foo 0}} {mips*-*}} + {selective4 C++ 3.cc {} {start foo__1A foo__1B} {bar__1A} {mips*-*}} + {selective5 C++ 4.cc {} {} {foo__1B foo__1A} {mips*-*}} {selective6 C++ 5.cc {} {} {foo__1B foo__1A dropme1__Fv dropme2__Fv} {*-*-*}} } diff --git a/ld/testsuite/ld-shared/main.c b/ld/testsuite/ld-shared/main.c index fe5c78ae423..ce06261eb7a 100644 --- a/ld/testsuite/ld-shared/main.c +++ b/ld/testsuite/ld-shared/main.c @@ -55,6 +55,7 @@ main () printf ("shlib_maincall () == %d\n", shlib_maincall ()); #endif printf ("main_called () == %d\n", main_called ()); +#ifndef SYMBOLIC_TEST printf ("shlib_checkfunptr1 (shlib_shlibvar1) == %d\n", shlib_checkfunptr1 (shlib_shlibvar1)); #ifndef XCOFF_TEST @@ -76,6 +77,7 @@ main () else printf ("!="); printf (" main_called\n"); +#endif #endif printf ("shlib_check () == %d\n", shlib_check ()); return 0; diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp index 43959e5b1a6..256c8623b59 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -36,6 +36,7 @@ if { ![istarget i?86-*-sysv4*] \ && ![istarget ia64-*-linux*] \ && ![istarget m68k-*-linux*] \ && ![istarget mips*-*-irix5*] \ + && ![istarget mips*-*-linux*] \ && ![istarget powerpc-*-elf*] \ && ![istarget powerpc-*-linux*] \ && ![istarget powerpc-*-sysv4*] \ @@ -204,6 +205,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] setup_xfail "*-*-linux*libc1" setup_xfail "powerpc-*-linux*" setup_xfail "ia64-*-linux*" + setup_xfail "mips*-*-linux*" shared_test shnp "shared (non PIC, load offset)" \ mainnp.o sh1np.o sh2np.o shared \ "-T $srcdir/$subdir/elf-offset.ld" @@ -222,8 +224,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] shared_test shp "shared" mainnp.o sh1p.o sh2p.o xcoff } else { shared_test shp "shared" mainnp.o sh1p.o sh2p.o shared - ld_compile "$CC $CFLAGS -DXCOFF_TEST $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o - ld_compile "$CC $CFLAGS -DXCOFF_TEST $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o + ld_compile "$CC $CFLAGS -DSYMBOLIC_TEST -DXCOFF_TEST $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o + ld_compile "$CC $CFLAGS -DSYMBOLIC_TEST -DXCOFF_TEST $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o shared_test shp "shared -Bsymbolic" mainnp.o sh1p.o sh2p.o symbolic "-Bsymbolic" ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o diff --git a/ld/testsuite/ld-shared/symbolic.dat b/ld/testsuite/ld-shared/symbolic.dat index 2859f3d06d6..71464867db2 100644 --- a/ld/testsuite/ld-shared/symbolic.dat +++ b/ld/testsuite/ld-shared/symbolic.dat @@ -5,6 +5,4 @@ shlib_shlibvar1 () == 3 shlib_shlibvar2 () == 4 shlib_shlibcall () == 5 main_called () == 6 -shlib_checkfunptr1 (shlib_shlibvar1) == 0 -shlib_getfunptr1 () != shlib_shlibvar1 shlib_check () == 1 diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp index c5784ba76f3..75eb3040526 100644 --- a/ld/testsuite/ld-srec/srec.exp +++ b/ld/testsuite/ld-srec/srec.exp @@ -341,7 +341,7 @@ setup_xfail "i*86-*-aout*" # These tests fail on the native MIPS ELF targets because the GP value # in the .reginfo section is not updated when the S-record version is # written out. The mips-elf target itself does not use a .reginfo section. -setup_xfail "mips*-*-irix5*" "mips*-*-irix6*" +setup_xfail "mips*-*-irix5*" "mips*-*-irix6*" "mips*-*-linux*" # The S-record linker doesn't do the magic TOC handling that XCOFF # linkers do. @@ -394,7 +394,7 @@ if ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/sr3.cc tmpdir/sr3. # See above. setup_xfail "i*86-*-aout*" -setup_xfail "mips*-*-irix5*" "mips*-*-irix6*" +setup_xfail "mips*-*-irix5*" "mips*-*-irix6*" "mips*-*-linux*" setup_xfail "*-*-aix*" "*-*-xcoff*" setup_xfail "arm*-*-*" setup_xfail "strongarm*-*-*"