Append $PLT_CFLAGS to CC for NOCROSSREFS tests
[deliverable/binutils-gdb.git] / ld / testsuite / ld-scripts / script.exp
index 2e699228ad17b5b1b398ef66b949dc6dcaaf4f27..6ab04ec01e013622390bf689ead7e49565b18f1f 100644 (file)
@@ -1,7 +1,6 @@
 # Test basic linker script functionality
 # By Ian Lance Taylor, Cygnus Support
-#   Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2009, 2010
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1999-2015 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -67,6 +66,13 @@ proc check_script { } {
        set passes 0
     } 
 
+    if {[info exists nm_output(tred)] \
+        && $nm_output(tred) != (0x100 + 0x8000)} {
+       send_log "tred == $nm_output(tred)\n"
+       verbose "tred == $nm_output(tred)"
+       set passes 0
+    }
+
     if {$nm_output(text_end) < $text_end \
            || $nm_output(text_end) > 0x110} {
        send_log "text_end == $nm_output(text_end)\n"
@@ -80,6 +86,13 @@ proc check_script { } {
        set passes 0
     } 
 
+    if {[info exists nm_output(fred)] \
+        && $nm_output(fred) != (0x1000 + 0x10000)} {
+       send_log "fred == $nm_output(fred)\n"
+       verbose "fred == $nm_output(fred)"
+       set passes 0
+    }
+
     if {$nm_output(data_end) < $data_end \
            || $nm_output(data_end) > 0x1010} {
        send_log "data_end == $nm_output(data_end)\n"
@@ -127,12 +140,17 @@ if ![ld_simple_link $ld tmpdir/script "$flags -T $srcdir/$subdir/memory.t tmpdir
     check_script
 }
 
+set testname "MEMORY with symbols"
+if ![ld_simple_link $ld tmpdir/script "$flags -defsym DATA_ORIGIN=0x1000 -defsym DATA_LENGTH=0x10000 -T $srcdir/$subdir/memory_sym.t tmpdir/script.o"] {
+    fail $testname
+} else {
+    check_script
+}
+
 set test_script_list [lsort [glob $srcdir/$subdir/region-alias-*.t]]
 
 foreach test_script $test_script_list {
-    if ![ld_simple_link $ld tmpdir/script "$flags -T $test_script tmpdir/script.o"] {
-        xfail "REGION_ALIAS: $test_script"
-    } else {
-        xpass "REGION_ALIAS: $test_script"
-    }
+    run_dump_test [string range $test_script 0 end-2]
 }
+
+run_dump_test "align-with-input"
This page took 0.023602 seconds and 4 git commands to generate.