Remove perror from ld_assemble, ld_compile and ld_nm
[deliverable/binutils-gdb.git] / ld / testsuite / ld-scripts / script.exp
index 7a044800d1074dea7626cf729bed6155cd1666c0..42bd452d6a1d1a64f723c4ddc866d3b43ff24aec 100644 (file)
@@ -1,6 +1,6 @@
 # Test basic linker script functionality
 # By Ian Lance Taylor, Cygnus Support
-#   Copyright (C) 1999-2017 Free Software Foundation, Inc.
+#   Copyright (C) 1999-2020 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -32,7 +32,7 @@ proc check_script { } {
     global nm_output
 
     if ![ld_nm $nm "" tmpdir/script] {
-       unresolved $testname
+       fail $testname
        return
     } 
 
@@ -67,7 +67,7 @@ proc check_script { } {
     } 
 
     if {[info exists nm_output(tred)] \
-        && $nm_output(tred) != (0x100 + 0x8000)} {
+        && $nm_output(tred) != (0x100 + 0x4000)} {
        send_log "tred == $nm_output(tred)\n"
        verbose "tred == $nm_output(tred)"
        set passes 0
@@ -87,7 +87,7 @@ proc check_script { } {
     } 
 
     if {[info exists nm_output(fred)] \
-        && $nm_output(fred) != (0x1000 + 0x10000)} {
+        && $nm_output(fred) != (0x1000 + 0x1000)} {
        send_log "fred == $nm_output(fred)\n"
        verbose "fred == $nm_output(fred)"
        set passes 0
@@ -192,7 +192,7 @@ if {[istarget "*-*-pe*"] \
   set flags "--image-base 0"
 }
 
-if ![ld_simple_link $ld tmpdir/script "$flags -T $srcdir/$subdir/script.t tmpdir/script.o"] {
+if ![ld_link $ld tmpdir/script "$flags -T $srcdir/$subdir/script.t tmpdir/script.o"] {
     fail $testname
 } else {
     check_script
@@ -200,7 +200,7 @@ if ![ld_simple_link $ld tmpdir/script "$flags -T $srcdir/$subdir/script.t tmpdir
 
 set testname "MRI script"
 
-if ![ld_simple_link $ld tmpdir/script "$flags -c $srcdir/$subdir/scriptm.t"] {
+if ![ld_link $ld tmpdir/script "$flags -c $srcdir/$subdir/scriptm.t"] {
     fail $testname
 } else {
     check_script
@@ -208,14 +208,14 @@ if ![ld_simple_link $ld tmpdir/script "$flags -c $srcdir/$subdir/scriptm.t"] {
 
 set testname "MEMORY"
 
-if ![ld_simple_link $ld tmpdir/script "$flags -T $srcdir/$subdir/memory.t tmpdir/script.o"] {
+if ![ld_link $ld tmpdir/script "$flags -T $srcdir/$subdir/memory.t tmpdir/script.o"] {
     fail $testname
 } else {
     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"] {
+if ![ld_link $ld tmpdir/script "$flags -defsym DATA_ORIGIN=0x1000 -defsym DATA_LENGTH=0x1000 -T $srcdir/$subdir/memory_sym.t tmpdir/script.o"] {
     fail $testname
     untested "extract symbols"
 } else {
@@ -231,3 +231,7 @@ foreach test_script $test_script_list {
 
 run_dump_test "align-with-input"
 run_dump_test "pr20302"
+
+run_dump_test "segment-start" {{name (default)}}
+run_dump_test "segment-start" {{name (overridden)} \
+                              {ld -Ttext-segment=0x10000000}}
This page took 0.026258 seconds and 4 git commands to generate.