Add tests for PR ld/20513
[deliverable/binutils-gdb.git] / ld / testsuite / ld-gc / gc.exp
index 996eac4bc357d5cd004d7004da5194e4ef051274..a6f3e13edce66a6f88ca0cebe584ca52ff4d9e94 100644 (file)
@@ -1,6 +1,5 @@
 # Expect script for ld-gc tests
-#   Copyright 2008, 2009, 2010, 2012
-#   Free Software Foundation, Inc.
+#   Copyright (C) 2008-2016 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -32,6 +31,11 @@ if [istarget powerpc64*-*-*] {
     set cflags "$cflags -mminimal-toc"
 }
 
+if { [istarget m681*-*-*] || [istarget m68hc1*-*-*] } {
+    # Otherwise tests FAIL due to _.frame
+    set cflags "$cflags -fomit-frame-pointer -mshort"
+}
+
 if { [is_remote host] || [which $CC] != 0 } {
     ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/gc.c $objfile
 }
@@ -97,6 +101,10 @@ 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 "pr19167"
+if { [is_elf_format] } then {
+    run_dump_test "all-debug-sections"
+}
 
 if { [is_elf_format] && [check_shared_lib_support] } then {
     set gasopt ""
@@ -109,6 +117,7 @@ if { [is_elf_format] && [check_shared_lib_support] } then {
     } else {
        run_dump_test "personality"
     }
+    run_dump_test "pr18223"
 }
 
 if { [is_remote host] || [which $CC] != 0 } {
@@ -126,3 +135,29 @@ if { [is_remote host] || [which $CC] != 0 } {
        ld_compile "$CC $CFLAGS $cflags" $srcdir/$subdir/pr13683.c tmpdir/pr13683.o
        run_dump_test "pr13683"
 }
+
+if { [is_remote host] || [which $CC] != 0 } {
+    ld_compile "$CC $CFLAGS $cflags" $srcdir/$subdir/pr14265.c tmpdir/pr14265.o
+    run_dump_test "pr14265"
+}
+
+if { [is_remote host] || [which $CC] != 0 } {
+    ld_compile "$CC $CFLAGS $cflags -O0" $srcdir/$subdir/pr19161-1.c tmpdir/pr19161-1.o
+    ld_compile "$CC $CFLAGS $cflags -O0" $srcdir/$subdir/pr19161-2.c tmpdir/pr19161-2.o
+    run_dump_test "pr19161"
+}
+
+if { [is_elf_format] && [check_shared_lib_support] \
+     && ([is_remote host] || [which $CC] != 0) } {
+    run_cc_link_tests [list \
+       [list \
+           "Build libpr20306.so" \
+           "-shared" \
+           "-fPIC" \
+           {pr20306.c} \
+           {} \
+           "libpr20306.so" \
+       ] \
+    ]
+    run_dump_test "pr20306"
+}
This page took 0.02443 seconds and 4 git commands to generate.