# Test that the linker reports undefined symbol line number correctly.
#
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
# MA 02110-1301, USA.
if { !([istarget "x86_64-*-elf*"]
+ || [istarget "x86_64-*-nacl*"]
|| [istarget "x86_64-*-linux*"]) } {
return
}
-set testline "undefined line"
-
-if { ![is_remote host] && [which $CC] == 0 } {
- verbose "Could not find C compiler!" 1
- untested $testline
- return
+if [istarget "*-*-nacl*"] {
+ set emul "elf_x86_64_nacl"
+} else {
+ set emul "elf_x86_64"
}
+set testline "undefined line"
+
if ![ld_assemble $as "--64 $srcdir/$subdir/undefined.s" tmpdir/undefined.o] {
verbose "Unable to assemble test file!" 1
unresolved $testline
# Using -e start prevents the SunOS linker from trying to build a
# shared library.
-send_log "$ld -e start -melf_x86_64 -o tmpdir/undefined tmpdir/undefined.o\n"
-set exec_output [run_host_cmd "$ld" "-e start -melf_x86_64 -o tmpdir/undefined tmpdir/undefined.o"]
+send_log "$ld -e start -m$emul -o tmpdir/undefined tmpdir/undefined.o\n"
+set exec_output [run_host_cmd "$ld" "-e start -m$emul -o tmpdir/undefined tmpdir/undefined.o"]
send_log "$exec_output\n"
verbose "$exec_output"