* ld-elfvsb/elf-offset.ld: Add .rel.eh_frame and .rela.eh_frame
[deliverable/binutils-gdb.git] / ld / testsuite / ld-undefined / undefined.exp
index 9025e026ee773ebcbac10bdb3a1299ea42a4d0bb..a8a27cdc4e1be0f4ecf623d25e5bf06097390cf4 100644 (file)
@@ -1,7 +1,8 @@
 # Test that the linker reports undefined symbol errors correctly.
 # By Ian Lance Taylor, Cygnus Support
 #
-#   Copyright (C) 1995, 1996, 1997 Free Software Foundation
+#   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,12 +40,14 @@ if ![ld_compile "$CC -g" $srcdir/$subdir/undefined.c tmpdir/undefined.o] {
 
 catch "exec rm -f tmpdir/undefined" exec_output
 
+set flags [big_or_little_endian]
+
 # Using -e start prevents the SunOS linker from trying to build a
 # shared library.
-send_log "$ld -e start -o tmpdir/undefined tmpdir/undefined.o\n"
-verbose "$ld -e start -o tmpdir/undefined tmpdir/undefined.o"
+send_log "$ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o\n"
+verbose "$ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o"
 
-catch "exec $ld -e start -o tmpdir/undefined tmpdir/undefined.o" exec_output
+catch "exec $ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o" exec_output
 send_log "$exec_output\n"
 verbose "$exec_output"
 
@@ -58,7 +61,7 @@ proc checkund { string testname } {
     }
 }
 
-set mu "undefined reference to `this_function_is_not_defined'"
+set mu "undefined reference to `*this_function_is_not_defined'"
 checkund $mu $testund
 
 # ARM PE defaults to using stabs debugging, which we can't handle for
@@ -69,7 +72,14 @@ checkund $mu $testund
 # Just doesn't work for PA ELF.  No clue why.
 setup_xfail "hppa*-*-*elf*"
 
-set mf "tmpdir/undefined.o: In function `function':"
+# With dwarf-2, we can't get the function in which the reference
+# occurs; see below.
+setup_xfail "alpha*-*-linux*"
+setup_xfail "hppa*64*-*-*"
+setup_xfail "mn10300-*-elf"
+setup_xfail "sh-*-*"
+
+set mf "tmpdir/undefined.o* In function `function':"
 checkund $mf $testfn
 
 # COFF SH gets this test wrong--it reports line 10, because although
@@ -85,7 +95,7 @@ setup_xfail "sh-*-*"
 # Just doesn't work for PA ELF.  No clue why.
 setup_xfail "hppa*-*-*elf*"
 
-set ml "undefined.c:9: undefined reference to `this_function_is_not_defined'"
+set ml "undefined.c:9: undefined reference to `*this_function_is_not_defined'"
 # With targets that use elf/dwarf2, such as the arm-elf and thumb-elf
 # toolchains, the code in bfd/elf.c:_bfd_elf_find_nearest_line() is called
 # in order to locate the file name/line number where the undefined
@@ -119,9 +129,19 @@ set ml "undefined.c:9: undefined reference to `this_function_is_not_defined'"
 #
 # hence the xfails below.
 
-setup_xfail arm-*-elf
-setup_xfail strongarm-*-elf
-setup_xfail thumb-*-elf
+#setup_xfail arm-*-elf
+setup_xfail i?86-*-freebsd*
+#setup_xfail strongarm-*-elf
+#setup_xfail thumb-*-elf
 setup_xfail mcore-*-elf
+setup_xfail mips-sgi-irix6*
+setup_xfail "sh64-*-*"
+
+# The undefined test fails on 31 bit s/390 because the address of the 
+# function `this_function_is_not_defined' is stored in the literal pool of
+# the function. Therefore the line number in the error message is 8 instead
+# of 9. On 64 bit s/390 this works because of the new brasl instruction that
+# doesn't need a literal pool entry.
+setup_xfail s390-*-*
 
 checkund $ml $testline
This page took 0.023779 seconds and 4 git commands to generate.