]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/testsuite/ld-fastcall/fastcall.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-fastcall / fastcall.exp
CommitLineData
c9e38879 1# Test that the linker can handle fastcall symbols correctly.
250d07de 2# Copyright (C) 2002-2021 Free Software Foundation, Inc.
c9e38879 3#
f96b4a7b
NC
4# This file is part of the GNU Binutils.
5#
6# This program is free software; you can redistribute it and/or modify
c9e38879 7# it under the terms of the GNU General Public License as published by
f96b4a7b 8# the Free Software Foundation; either version 3 of the License, or
c9e38879 9# (at your option) any later version.
f96b4a7b 10#
c9e38879
NC
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
f96b4a7b 15#
c9e38879
NC
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
f96b4a7b
NC
18# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19# MA 02110-1301, USA.
c9e38879
NC
20
21set testname "ld (fastcall symbols)"
22
42037fe5 23if {![istarget "i*86-*-*"] && ![istarget "x86_64-*-mingw*"] } {
c9e38879
NC
24 return
25}
26
19dce677 27if { !([istarget "i*86-*-*pe*"] && ![istarget "i*86-*-opensd*"]) \
c9e38879 28 && ![istarget "i*86-*-cygwin*"] \
42037fe5 29 && ![istarget "x86_64-*-mingw*"] \
99ad8390 30 && ![istarget "i*86-*-mingw*"] } {
3d198be3 31 return
c9e38879
NC
32}
33
34set ldflags ""
35
36if ![ld_assemble $as $srcdir/$subdir/export.s tmpdir/export.o] {
37 verbose "Unable to assemble test file!" 1
348fe36b 38 fail $testname
c9e38879
NC
39 return
40}
41
42if ![ld_assemble $as $srcdir/$subdir/import.s tmpdir/import.o] {
43 verbose "Unable to assemble test file!" 1
348fe36b 44 fail $testname
c9e38879
NC
45 return
46}
47
d9816402 48if ![ld_link $ld tmpdir/extern.x "$ldflags tmpdir/export.o tmpdir/import.o"] {
c9e38879
NC
49 fail $testname
50} else {
51 pass $testname
52}