Append $PLT_CFLAGS to CC for NOCROSSREFS tests
[deliverable/binutils-gdb.git] / ld / testsuite / ld-scripts / script.exp
index 68346e0aab06f266088d07a55fb90257f1f45877..6ab04ec01e013622390bf689ead7e49565b18f1f 100644 (file)
@@ -1,6 +1,6 @@
 # Test basic linker script functionality
 # By Ian Lance Taylor, Cygnus Support
-#   Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#   Copyright (C) 1999-2015 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -66,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"
@@ -79,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"
@@ -126,6 +140,13 @@ 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 {
This page took 0.023854 seconds and 4 git commands to generate.