X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ld%2Ftestsuite%2Fld-undefined%2Fundefined.exp;h=e80be032f0b0830c89fab234cb913d32ed56842d;hb=aa820537ead0135a7c38c619039dce8a6fc74ed1;hp=4d6b6243a130ed970deebfdd4f5b0a14d14c771a;hpb=52a43e710025c249ec5d6d87ca60a9e7b82209ee;p=external%2Fbinutils.git diff --git a/ld/testsuite/ld-undefined/undefined.exp b/ld/testsuite/ld-undefined/undefined.exp index 4d6b624..e80be03 100644 --- a/ld/testsuite/ld-undefined/undefined.exp +++ b/ld/testsuite/ld-undefined/undefined.exp @@ -1,28 +1,31 @@ # Test that the linker reports undefined symbol errors correctly. # By Ian Lance Taylor, Cygnus Support # -# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. +# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2007, 2008 Free Software Foundation, Inc. # -# This file is free software; you can redistribute it and/or modify +# This file is part of the GNU Binutils. +# +# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. set testund "undefined" set testfn "undefined function" set testline "undefined line" -if { [which $CC] == 0 } { +if { ![is_remote host] && [which $CC] == 0 } { verbose "Could not find C compiler!" 1 untested $testund untested $testfn @@ -38,16 +41,15 @@ if ![ld_compile "$CC -g" $srcdir/$subdir/undefined.c tmpdir/undefined.o] { return } -catch "exec rm -f tmpdir/undefined" exec_output +remote_file host delete "tmpdir/undefined" 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 $flags -o tmpdir/undefined tmpdir/undefined.o\n" -verbose "$ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o" +set exec_output [run_host_cmd "$ld" "-e start $flags -o tmpdir/undefined tmpdir/undefined.o"] -catch "exec $ld -e start $flags -o tmpdir/undefined tmpdir/undefined.o" exec_output send_log "$exec_output\n" verbose "$exec_output" @@ -69,6 +71,12 @@ checkund $mu $testund #setup_xfail "arm*-*-pe*" #setup_xfail "thumb*-*-pe*" +# For Xtensa on GNU Linux systems (or any other system where PIC code is +# always used), the address of the undefined function is in a literal pool +# outside the function, so that both the "undefined function" and "undefined +# line" tests fail. +setup_xfail xtensa*-*-linux* + set mf "tmpdir/undefined.o* In function `function':" checkund $mf $testfn @@ -119,6 +127,7 @@ set ml "undefined.c:9: undefined reference to `*this_function_is_not_defined'" # hence the xfails below. setup_xfail mcore-*-elf +setup_xfail mep-*-* setup_xfail mips-sgi-irix6* setup_xfail "sh64-*-*" @@ -129,4 +138,7 @@ setup_xfail "sh64-*-*" # doesn't need a literal pool entry. setup_xfail s390-*-* +# See comments above for Xtensa. +setup_xfail xtensa*-*-linux* + checkund $ml $testline