ld: Hide symbols defined by HIDDEN/PROVIDE_HIDDEN
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / dwarf.exp
index 32a492300360d861290b4aeccd1e5fc586e42a6a..975654c463c50126f24b2504fc67d61412cf8f2d 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for various DWARF tests.
-#   Copyright (C) 2006-2016 Free Software Foundation, Inc.
+#   Copyright (C) 2006-2018 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -29,8 +29,9 @@ if ![is_elf_format] {
     return
 }
 
-# The following tests require running the executable generated by ld.
-if ![isnative] {
+# Skip targets where -shared is not supported
+
+if ![check_shared_lib_support] {
     return
 }
 
@@ -48,11 +49,17 @@ set build_tests {
   {"Build libdwarf1.so"
    "-s -shared" "-fPIC -g -feliminate-dwarf2-dups"
    {dwarf1.c} {} "libdwarf1.so"}
+  {"DWARF parse during linker error"
+   "" "-fno-toplevel-reorder"
+   {dwarf2a.c dwarf2b.c} {{error_output "dwarf2.err"}} "dwarf2.x"}
+  {"Handle no DWARF information"
+   "" "-g0"
+   {dwarf3.c} {{error_output "dwarf3.err"}} "dwarf3.x"}
 }
 
 set run_tests {
     {"Run with libdwarf1.so first"
-     "tmpdir/libdwarf1.so" ""
+     "-Wl,--no-as-needed tmpdir/libdwarf1.so" ""
      {dwarf1main.c} "dwarf1a" "dwarf1.out"
      "-g -feliminate-dwarf2-dups"}
     {"Run with libdwarf1.so last"
@@ -62,7 +69,7 @@ set run_tests {
 }
 
 run_cc_link_tests $build_tests
-run_ld_link_exec_tests [] $run_tests
+run_ld_link_exec_tests $run_tests
 
 proc strip_test {} {
     global ld
@@ -73,7 +80,7 @@ proc strip_test {} {
     set test_name "Strip -s $test"
     set prog $strip
 
-    if ![ld_simple_link $ld tmpdir/$test "-shared tmpdir/dwarf1.o"] {
+    if ![ld_link $ld tmpdir/$test "-shared tmpdir/dwarf1.o"] {
        unresolved "$test_name"
        return
     }
This page took 0.024531 seconds and 4 git commands to generate.