[gdb/testsuite] Add cc-with-dwz.exp and cc-with-dwz-m.exp
[deliverable/binutils-gdb.git] / ld / testsuite / ld-gc / gc.exp
index eaaa8e158ab29c78698a5084dc67c378762c5008..536356c3816301b1ad469476dc3a8199e981ce45 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-gc tests
-#   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2008-2019 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -59,15 +59,6 @@ proc test_gc { testname filename linker ldflags} {
     set options "-L$srcdir/$subdir"
     append options " " $ldflags " " [ld_link_defsyms] " " $objfile
 
-    # SH64 targets needs an extra ld option for this test.
-    if [istarget sh64*-*-*] {
-       if [istarget sh64*l*-*-*] {
-           set options "-mshlelf32 $options"
-       } else {
-           set options "-mshelf32 $options"
-       }
-    }
-
     if ![ld_link $linker $outfile $options] {
        fail $testname
        return
@@ -104,6 +95,7 @@ test_gc "Check --gc-section/-r/-u" "gcrel" $ld "-r --gc-sections -u used_func"
 run_dump_test "noent"
 run_dump_test "abi-note"
 run_dump_test "start"
+run_dump_test "stop"
 run_dump_test "pr19167"
 if { [is_elf_format] } then {
     run_dump_test "all-debug-sections"
@@ -115,6 +107,13 @@ if { [is_elf_format] && [check_shared_lib_support] } then {
     if { [istarget tic6x-*] } then {
        set gasopt "-mpic -mpid=near"
     }
+    # These targets do not default to linking with shared libraries.
+    set old_ldflags $LDFLAGS
+    if { [istarget "mips*vr4100*-*-elf*"] \
+        || [istarget "mips*vr4300*-*-elf*"] \
+        || [istarget "mips*vr5000*-*-elf*"] } {
+       append LDFLAGS " -call_shared"
+    }
     if {![ld_assemble_flags $as $gasopt $srcdir/$subdir/libpersonality.s tmpdir/libpersonality.o]
        || ![ld_link $ld tmpdir/libpersonality.so "-shared tmpdir/libpersonality.o"] } then {
        fail libpersonality
@@ -128,6 +127,7 @@ if { [is_elf_format] && [check_shared_lib_support] } then {
     } else {
        run_dump_test "pr20022"
     }
+    set LDFLAGS $old_ldflags
 }
 
 if { [is_remote host] || [which $CC] != 0 } {
This page took 0.024533 seconds and 4 git commands to generate.