OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.18.50/] [ld/] [testsuite/] [ld-ia64/] [line.exp] - Diff between revs 38 and 156

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 38 Rev 156
# Test that the linker reports undefined symbol line number correctly.
# Test that the linker reports undefined symbol line number correctly.
#
#
#   Copyright 2007  Free Software Foundation, Inc.
#   Copyright 2007  Free Software Foundation, Inc.
#
#
# This file is part of the GNU Binutils.
# This file is part of the GNU Binutils.
#
#
# This program is free software; you can redistribute it and/or modify
# 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
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.
# MA 02110-1301, USA.
if { !([istarget "ia64-*-elf*"]
if { !([istarget "ia64-*-elf*"]
       || [istarget "ia64-*-linux*"]) } {
       || [istarget "ia64-*-linux*"]) } {
    return
    return
}
}
set testline "undefined line"
set testline "undefined line"
if ![ld_assemble $as "-x $srcdir/$subdir/undefined.s" tmpdir/undefined.o] {
if ![ld_assemble $as "-x $srcdir/$subdir/undefined.s" tmpdir/undefined.o] {
    verbose "Unable to assemble test file!" 1
    verbose "Unable to assemble test file!" 1
    unresolved $testline
    unresolved $testline
    return
    return
}
}
remote_file host delete "tmpdir/undefined"
remote_file host delete "tmpdir/undefined"
# Using -e start prevents the SunOS linker from trying to build a
# Using -e start prevents the SunOS linker from trying to build a
# shared library.
# shared library.
send_log "$ld -e start -o tmpdir/undefined tmpdir/undefined.o\n"
send_log "$ld -e start -o tmpdir/undefined tmpdir/undefined.o\n"
set exec_output [run_host_cmd "$ld" "-e start -o tmpdir/undefined tmpdir/undefined.o"]
set exec_output [run_host_cmd "$ld" "-e start -o tmpdir/undefined tmpdir/undefined.o"]
send_log "$exec_output\n"
send_log "$exec_output\n"
verbose "$exec_output"
verbose "$exec_output"
proc checkund { string testname } {
proc checkund { string testname } {
    global exec_output
    global exec_output
    if [string match "*$string*" $exec_output] {
    if [string match "*$string*" $exec_output] {
        pass $testname
        pass $testname
    } else {
    } else {
        fail $testname
        fail $testname
    }
    }
}
}
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'"
checkund $ml $testline
checkund $ml $testline
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.