Nuke binutils testsuite.
This commit is contained in:
parent
33247bac6d
commit
0a22b3e927
441
gnu/dist/binutils/testsuite/ChangeLog
vendored
441
gnu/dist/binutils/testsuite/ChangeLog
vendored
@ -1,441 +0,0 @@
|
||||
Wed May 21 12:02:41 1997 Manfred Hollstein <manfred@s-direktnet.de>
|
||||
|
||||
* binutils-all/ar.exp (long_filenames): Use `cd ./tmpdir' to avoid
|
||||
output from the shell if tmpdir is found via $CDPATH.
|
||||
|
||||
Mon Apr 14 12:36:41 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/ar.exp (long_filenames): Check for a file system
|
||||
with a 14 character file name length limit.
|
||||
|
||||
Tue Apr 1 09:52:15 1997 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* binutils-all/objdump.exp: Handle d10v.
|
||||
|
||||
Fri Feb 7 16:45:34 1997 Bob Manson <manson@charmed.cygnus.com>
|
||||
|
||||
* binutils-all/ar.exp: Use prune_warnings instead of
|
||||
prune_system_crud.
|
||||
* binutils-all/objcopy.exp: Ditto.
|
||||
|
||||
Wed Jan 29 00:16:43 1997 Bob Manson <manson@charmed.cygnus.com>
|
||||
|
||||
* binutils-all/nm.exp: Use / between $srcdir and $subdir.
|
||||
* binutils-all/objcopy.exp: Ditto.
|
||||
* binutils-all/objdump.exp: Ditto.
|
||||
* binutils-all/size.exp: Ditto.
|
||||
* binutils-all/hppa/objdump.exp: Ditto.
|
||||
|
||||
|
||||
Wed Oct 16 22:57:59 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* binutils-all/objdump.exp: Add mn10200 and mn10300 to expected
|
||||
cpus list.
|
||||
|
||||
Tue Oct 1 15:06:55 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* lib/utils-lib.exp (binutil_version): Fix for current version
|
||||
printing.
|
||||
|
||||
Sun Aug 4 22:25:40 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Fix end of line matching in srec tests
|
||||
to work with TCL 7.5.
|
||||
|
||||
Sat Jun 29 12:51:30 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Simple copy test works for i960 b.out
|
||||
targets.
|
||||
|
||||
Mon Jun 24 14:33:04 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: On OSF/1, the simple copy test will
|
||||
succeed with gas, and fail with /bin/as, so mark it as an expected
|
||||
failure only if it fails.
|
||||
|
||||
Tue Mar 26 16:55:08 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* binutils-all/objcopy.exp: No longer expect adjust-section-vma
|
||||
test to fail for hppa*-*-proelf*.
|
||||
|
||||
Mon Mar 11 08:25:14 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* binutils-all/objdump.exp: Look for "$CODE$", not just "CODE".
|
||||
|
||||
Wed Jan 31 11:55:13 1996 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* binutils-all/objcopy.exp: Expect adjust-section-vma tests to
|
||||
fail for hppa*-*-proelf* targets.
|
||||
|
||||
Thu Jan 25 13:53:04 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objdump.exp: Update for objdump -h format change.
|
||||
* binutils-all/objcopy.exp: Likewise.
|
||||
|
||||
Mon Jan 15 18:14:14 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Use the lma, not the vma, when testing
|
||||
address adjustments.
|
||||
|
||||
Fri Dec 15 16:31:55 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objdump.exp: Update objdump -i test for current
|
||||
objdump output.
|
||||
|
||||
Mon Nov 27 15:15:09 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Correct fail calls to always use the
|
||||
same string as the pass call.
|
||||
|
||||
Wed Nov 22 13:18:58 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* lib/utils-lib.exp (prune_system_crud): Discard -g -O warnings
|
||||
from native compilers on OSF/1 and SunOS.
|
||||
|
||||
Fri Nov 17 10:36:09 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* lib/utils-lib.exp (default_binutils_compiler: Change error
|
||||
message to say compilation rather than assembly.
|
||||
|
||||
Wed Nov 15 18:34:42 1995 Ken Raeburn <raeburn@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Simple copy test does appear to work
|
||||
on i*86-svr4.
|
||||
|
||||
Wed Nov 15 12:19:28 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: If assembly fails, call unresolved.
|
||||
Test running objcopy and strip on a final executable.
|
||||
* binutils-all/testprog.c: New file.
|
||||
* config/default.exp (STRIP, STRIPFLAGS): Define.
|
||||
(binutils_compile): New procedure.
|
||||
* lib/utils-lib.exp (default_binutils_compile): New procedure.
|
||||
|
||||
Fri Nov 3 13:22:33 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* lib/utils-lib.exp (default_binutils_run): Don't use verbose
|
||||
-log, reverting part of Oct 2 change.
|
||||
|
||||
Wed Nov 1 15:09:57 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
|
||||
|
||||
* binutils-all/objcopy.exp: Add setup_xfails for
|
||||
m68*-motorola-sysv* and m88*-motorola-sysv*.
|
||||
|
||||
Wed Oct 4 14:38:31 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/nm.exp: Add setup_xfails for XCOFF.
|
||||
|
||||
Mon Oct 2 12:41:48 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/ar.exp: New file.
|
||||
* binutils-all/bintest.s: Make text_symbol and data_symbol global.
|
||||
Add new static symbols static_text_symbol and static_data_symbol.
|
||||
* binutils-all/nm.exp: Adjust accordingly.
|
||||
* config/default.exp (AR): Set if not set.
|
||||
(binutils_remove): New procedure.
|
||||
* lib/utils-lib.exp (default_binutils_run): Call
|
||||
prune_system_crud on program output. Use verbose -log instead of
|
||||
both verbose and send_log.
|
||||
(default_binutils_remove): New procedure.
|
||||
|
||||
* lib/utils-lib.exp (default_binutils_assemble): Call
|
||||
prune_system_crud on assembler output.
|
||||
|
||||
Tue Sep 26 14:07:05 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Add setup_xfails for simple copy test
|
||||
for i386 COFF targets.
|
||||
|
||||
Wed Sep 13 13:20:21 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* lib/utils-lib.exp (prune_system_crud): Define if not defined.
|
||||
* binutils-all/objcopy.exp: Call prune_system_crud on cmp output.
|
||||
|
||||
Sat Aug 19 17:38:06 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Add xfail for i*86-*-aout* for simple
|
||||
copy test.
|
||||
|
||||
Wed Aug 16 16:52:53 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/nm.exp: Add setup_xfail for mips*-sony-bsd* for
|
||||
tests which fail on ECOFF targets.
|
||||
|
||||
* binutils-all/objcopy.exp: Change i*86-*-linux xfail for simple
|
||||
copy test to check for i*86-*-linuxaout* instead.
|
||||
|
||||
Tue Aug 8 17:48:37 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Add setup_xfail for a29k-*-vxworks*
|
||||
for simple copy test.
|
||||
|
||||
Tue Jul 25 11:57:12 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Change setup_xfail for simple copy
|
||||
test from i960-*-vxworks5.1 to i960-*-vxworks*.
|
||||
|
||||
Mon Jul 10 12:25:46 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Add setup_xfail for z8*-*-coff for
|
||||
simple copy test.
|
||||
* binutils-all/objdump.exp (cpus_expected): Add z8001 and z8002.
|
||||
|
||||
Sun May 21 20:32:53 1995 Jeff Law (law@snake.cs.utah.edu)
|
||||
|
||||
* binutils-all/hppa/objdump.exp (addendbug): Handle PA ELF targets
|
||||
too.
|
||||
* binutils-all/objcopy.exp (simple copy): Don't expect PA ELF
|
||||
targets to fail.
|
||||
|
||||
Tue Apr 4 14:52:08 1995 Jeff Law (law@snake.cs.utah.edu)
|
||||
|
||||
* binutils-all/hppa: Renamed from binutils-hppa.
|
||||
|
||||
Wed Mar 29 12:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Add setup_xfail for simple copy test
|
||||
for h8500-*-hms and h8500-*-coff.
|
||||
|
||||
Tue Mar 28 11:18:28 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Add setup_xfail for simple copy test
|
||||
for m68*-ericsson-ose and m88*-*-coff.
|
||||
|
||||
Mon Mar 27 11:27:31 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Add setup_xfail for simple copy test
|
||||
for m68*-*-vxworks*.
|
||||
|
||||
Fri Mar 24 11:44:25 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-hppa/objdump.exp: Correct hppa*-*-* check.
|
||||
|
||||
Tue Mar 21 10:48:45 1995 Jeff Law (law@snake.cs.utah.edu)
|
||||
|
||||
* binutils-hppa/addendbug.s: New testcase.
|
||||
* binutils-hppa/objdump.exp: Run it.
|
||||
|
||||
Mon Mar 20 11:31:05 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* lib/utils-lib.exp (default_binutils_run): Quote any dollar signs
|
||||
in progargs before passing it to exec.
|
||||
|
||||
Fri Mar 17 16:39:31 1995 Jeff Law (law@snake.cs.utah.edu)
|
||||
|
||||
* config/hppa.sed: Sed script to transform bintest.s into proper
|
||||
PA assembly code.
|
||||
* binutils-all/nm.exp: Enable these tests on the PA.
|
||||
* binutils-all/objcopy.exp: Enable these tests on the PA. Expect
|
||||
simple copy to fail.
|
||||
* binutils-all/objdump.exp: Enable these tests on the PA. Handle
|
||||
"CODE" as a section name.
|
||||
* binutils-all/size.exp: Enable these tests on the PA.
|
||||
* lib/utils-lib.exp (default_binutils_assemble): For "hppa*-*-*",
|
||||
run the assembly through a sed script before passing it to the
|
||||
assembler.
|
||||
|
||||
Wed Mar 15 16:47:13 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/objdump.exp: Force section sizes to be interpreted
|
||||
in hex. Change objdump -h failure mode to always use the same
|
||||
string.
|
||||
|
||||
Thu Jan 5 13:01:43 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* binutils-all/nm.exp: Just check for irix4*, rather than
|
||||
irix\[0-4\]*, to avoid DejaGnu bug.
|
||||
|
||||
Thu Dec 15 19:35:31 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Expect simple-objcopy test to fail
|
||||
for various other targets for which gas doesn't use bfd: sh-hms,
|
||||
m68k-hpux, m68k-sunos, m68k-coff, i386-linux, a29k-udi, a29k-coff,
|
||||
i960-vxworks5.1, i960-coff, h8300-hms, h8300-coff.
|
||||
|
||||
Wed Dec 14 15:54:46 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||
|
||||
* binutils-all/size.exp: Skip tests requiring bintest.o on hppa,
|
||||
since it (correctly) generates syntax errors on that platform.
|
||||
* binutils-all/objdump.exp: Ditto.
|
||||
* binutils-all/nm.exp: Ditto.
|
||||
* binutils-all/objcopy.exp: Ditto. Also, move setup_xfail for
|
||||
sh-coff to branch where objcopy execution produced no error
|
||||
messages. Expect failure for hp300 also.
|
||||
|
||||
Thu Dec 8 14:36:15 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||
|
||||
* binutils-all/objdump.exp (cpus_expected): New variable, taken
|
||||
from objdump -i test, added ns32k and powerpc, sorted.
|
||||
(objdump -i, -f tests): Use $cpus_expected.
|
||||
|
||||
* binutils-all/objcopy.exp: For simple-copy test, expect failure
|
||||
for sh-coff.
|
||||
|
||||
Tue Oct 25 16:00:14 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
|
||||
|
||||
* binutils-all/objcopy.exp: Adjust --adjust-section-vma tests for
|
||||
new S-record section handling.
|
||||
|
||||
Tue Oct 18 11:18:21 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
|
||||
|
||||
* binutils-all/nm.exp: nm with no arguments and nm -P do not work
|
||||
as expected on ECOFF targets; add calls to setup_xfail.
|
||||
|
||||
* binutils-all/objcopy.exp: New file.
|
||||
* config/default.exp: Initialize OBJCOPY and OBJCOPYFLAGS.
|
||||
|
||||
Fri Oct 14 14:46:22 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
|
||||
|
||||
Rewrite testsuite.
|
||||
* configure.in, Makefile.in: Remove.
|
||||
* binutils-all/configure.in, binutils-all/Makefile.in: Remove.
|
||||
* binutils-all/bintest.c: Remove.
|
||||
* binutils-all/bintest.s: New file.
|
||||
* binutils-all/nm.exp, binutils-all/objdump.exp: Rewrite.
|
||||
* binutils-all/size.exp: Rewrite.
|
||||
* config/default.exp: Load utils-lib.exp. Set AS and ASFLAGS.
|
||||
Don't go up one directory from $base_dir. Create tmpdir.
|
||||
(binutils_run, binutils-assemble): New procedures.
|
||||
* config/unix.exp: Remove.
|
||||
* config/mt-a29k-udi, config/mt-i386-aout: Remove.
|
||||
* config/mt-i960-nindy, config/mt-lynx, config/mt-m68k: Remove.
|
||||
* config/mt-mips-ecoff, config/mt-slite: Remove.
|
||||
* config/mt-sparc-aout, config/mt-vxworks: Remove.
|
||||
* lib/utils-lib.exp (binutil_version): Don't redirect standard
|
||||
input when getting version. Don't unset errorInfo.
|
||||
(default_binutils_run): New procedure.
|
||||
(default_binutils_assemble): New procedure.
|
||||
|
||||
Thu Sep 29 12:45:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||
|
||||
* VMS does not permit `.' in directory names: renamed binutils.all
|
||||
to binutils-all.
|
||||
* configure.in (configdirs): Change binutils.all to binutils-all.
|
||||
|
||||
Fri Sep 23 16:01:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||
|
||||
* configure.in: Use mt-m68k for m68k*-*-aout* and m68k*-*-coff*,
|
||||
not for m68k-*-*.
|
||||
|
||||
Fri Sep 23 13:54:50 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||
|
||||
* binutils.all/objdump.exp: Added ARM to list of CPU types.
|
||||
|
||||
Thu Sep 22 11:04:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||
|
||||
* binutils.all/objdump.exp: Update for new usage message.
|
||||
* binutils.all/size.exp: Use a double backslash in the string to
|
||||
get a single backslash to the regexp matcher. Accept $TEXT$,
|
||||
$DATA$ and $BSS$ as well as .text, .data and .bss, for HP/UX.
|
||||
|
||||
Fri Sep 2 12:53:10 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||
|
||||
* config/unix.exp: If nm.new does not exist, use [transform nm].
|
||||
* config/default.exp: Likewise.
|
||||
|
||||
Wed Aug 24 12:41:37 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||
|
||||
* configure.in, binutils.all/configure.in: Change i386 to
|
||||
i[345]86.
|
||||
|
||||
Tue Jul 19 15:23:53 1994 Bill Cox (bill@rtl.cygnus.com)
|
||||
|
||||
* config/mt-mips-ecoff: Add -Tidp.ld option.
|
||||
|
||||
Thu Jun 30 12:41:55 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
|
||||
|
||||
* config/default.exp: Use nm.new, not nm, from newly built tree.
|
||||
|
||||
Tue May 17 14:04:05 1994 Bill Cox (bill@rtl.cygnus.com)
|
||||
|
||||
* config/default.exp, config/unix.exp: Replace error
|
||||
proc calls with perror.
|
||||
|
||||
Tue May 10 11:20:54 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||
|
||||
* configure.in (sparclite): Match on sparclite*-*-*.
|
||||
|
||||
Wed Apr 13 18:25:19 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
|
||||
|
||||
* config/unix.exp: Use nm.new, not nm, from newly built tree.
|
||||
|
||||
* binutils.all/objdump.exp: Add more wildcards to list of
|
||||
single-letter options in pattern for usage message.
|
||||
|
||||
* binutils.all/nm.exp: Deleted debug-symbols test, since it only
|
||||
works for a.out/stabs systems. Fixed regexps to make underscores
|
||||
optional, since some C compilers don't prepend them. Deleted
|
||||
check for foo.o symbol, since again some systems don't generate
|
||||
it.
|
||||
|
||||
Mon Apr 11 10:31:00 1994 Bill Cox (bill@rtl.cygnus.com)
|
||||
|
||||
* Makefile.in (check): Set TCL_LIBRARY for runtest.
|
||||
|
||||
Mon Feb 14 19:34:03 1994 Rob Savoye (rob@darkstar.cygnus.com)
|
||||
|
||||
* Makefile.in: Use new config features of DejaGnu in site.exp
|
||||
file. "Make check" should now work for all crosses.
|
||||
|
||||
Fri Jan 28 18:00:29 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
|
||||
|
||||
* binutils.all/objdump.exp: In usage message, accept
|
||||
"section-name" as well as "section_name".
|
||||
|
||||
Mon Jan 17 16:57:02 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
|
||||
|
||||
* binutils.all/objdump.exp: Trim list of format names expected,
|
||||
and accept any known CPU type.
|
||||
|
||||
Thu Dec 2 20:50:24 1993 Rob Savoye (rob@darkstar.cygnus.com)
|
||||
|
||||
* Makefile.in: Remove some stuff from the site.exp file.
|
||||
* config/unix.exp: Add global before seeing if the variables for
|
||||
nm, objdump, and size exist.
|
||||
|
||||
Wed Nov 3 11:12:32 1993 Rob Savoye (rob@darkstar.cygnus.com)
|
||||
|
||||
* config/udi.exp,unix.exp: Transform tool name.
|
||||
* binutils.all/*.exp: Clear errorInfo after exec.
|
||||
|
||||
Fri Jul 2 12:41:20 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* binutils.all/*.exp: Use -- for long arguments rather than +.
|
||||
|
||||
Fri Jun 4 10:52:29 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||
|
||||
* configure.in: change srctrigger to Makefile.in
|
||||
|
||||
Wed May 26 17:27:46 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* Makefile.in (FLAGS_TO_PASS): Pass down CC and CFLAGS.
|
||||
|
||||
Fri May 7 13:58:44 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* binutils.all/objdump.exp: Update for new usage message.
|
||||
|
||||
Mon Apr 19 14:08:52 1993 Rob Savoye (rob@darkstar.cygnus.com)
|
||||
|
||||
* binutils.all/*.exp: Use the new util_test proc.
|
||||
* Makefile.in: Create a local site.exp file with config info.
|
||||
|
||||
Thu Mar 25 05:38:47 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
|
||||
|
||||
* nm.all/configure.in (srcname): Delete extra quote.
|
||||
|
||||
Mon Feb 22 07:54:03 1993 Mike Werner (mtw@poseidon.cygnus.com)
|
||||
|
||||
* binutils/testsuite: made modifications to testcases, etc., to allow
|
||||
them to work properly given the reorganization of deja-gnu and the
|
||||
relocation of the testcases from deja-gnu to a "tool" subdirectory.
|
||||
|
||||
Sun Feb 21 10:55:55 1993 Mike Werner (mtw@poseidon.cygnus.com)
|
||||
|
||||
* binutils/testsuite: Initial creation of binutils/testsuite.
|
||||
Migrated dejagnu testcases and support files for testing nm to
|
||||
binutils/testsuite from deja-gnu. These files were moved "as is"
|
||||
with no modifications. This migration is part of a major overhaul
|
||||
of dejagnu. The modifications to these testcases, etc., which
|
||||
will allow them to work with the new version of dejagnu will be
|
||||
made in a future update.
|
||||
|
171
gnu/dist/binutils/testsuite/binutils-all/ar.exp
vendored
171
gnu/dist/binutils/testsuite/binutils-all/ar.exp
vendored
@ -1,171 +0,0 @@
|
||||
# Copyright (C) 1995, 1997 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
# (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.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-dejagnu@prep.ai.mit.edu
|
||||
|
||||
# Written by Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
if {[which $AR] == 0} then {
|
||||
perror "$AR does not exist"
|
||||
return
|
||||
}
|
||||
|
||||
# send_user "Version [binutil_version $AR]"
|
||||
|
||||
# Test long file name support
|
||||
|
||||
proc long_filenames { } {
|
||||
global AR
|
||||
global host_triplet
|
||||
|
||||
set testname "ar long file names"
|
||||
|
||||
set n1 "abcdefghijklmnopqrstuvwxyz1"
|
||||
set n2 "abcdefghijklmnopqrstuvwxyz2"
|
||||
|
||||
binutils_remove tmpdir/$n1
|
||||
set status [catch "set f [open tmpdir/$n1 w]" errs]
|
||||
if { $status != 0 } {
|
||||
verbose -log "open tmpdir/$n1 returned $errs"
|
||||
unsupported $testname
|
||||
return
|
||||
}
|
||||
puts $f "first"
|
||||
close $f
|
||||
|
||||
binutils_remove tmpdir/$n2
|
||||
set status [catch "set f [open tmpdir/$n2 w]" errs]
|
||||
if { $status != 0 } {
|
||||
verbose -log "open tmpdir/$n2 returned $errs"
|
||||
unsupported $testname
|
||||
return
|
||||
}
|
||||
puts $f "second"
|
||||
close $f
|
||||
|
||||
# Some file systems truncate file names at 14 characters, which
|
||||
# makes it impossible to run this test. Check for that now.
|
||||
set f [open tmpdir/$n1 r]
|
||||
gets $f string
|
||||
close $f
|
||||
if ![string match "first" $string] {
|
||||
verbose -log "reading tmpdir/$n1 returned $string"
|
||||
unsupported $testname
|
||||
return
|
||||
}
|
||||
|
||||
binutils_remove tmpdir/artest.a
|
||||
set got [binutils_run $AR "rc tmpdir/artest.a tmpdir/$n1 tmpdir/$n2"]
|
||||
if ![string match "" $got] {
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
|
||||
binutils_remove tmpdir/$n1
|
||||
binutils_remove tmpdir/$n2
|
||||
|
||||
set got [binutils_run $AR "t tmpdir/artest.a"]
|
||||
if ![string match "$n1*$n2" $got] {
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
|
||||
verbose -log "cd ./tmpdir; $AR x artest.a"
|
||||
catch "exec /bin/sh -c \"cd ./tmpdir; $AR x artest.a\"" exec_output
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
if ![string match "" $exec_output] {
|
||||
verbose -log $exec_output
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
|
||||
if ![file exists tmpdir/$n1] {
|
||||
verbose -log "tmpdir/$n1 does not exist"
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
if ![file exists tmpdir/$n2] {
|
||||
verbose -log "tmpdir/$n2 does not exist"
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
|
||||
set f [open tmpdir/$n1 r]
|
||||
if { [gets $f line] == -1 || $line != "first" } {
|
||||
verbose -log "tmpdir/$n1 contents:"
|
||||
verbose -log "$line"
|
||||
close $f
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
close $f
|
||||
|
||||
set f [open tmpdir/$n2 r]
|
||||
if { [gets $f line] == -1 || $line != "second" } {
|
||||
verbose -log "tmpdir/$n2 contents:"
|
||||
verbose -log "$line"
|
||||
close $f
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
close $f
|
||||
|
||||
pass $testname
|
||||
}
|
||||
|
||||
# Test building the symbol table.
|
||||
|
||||
proc symbol_table { } {
|
||||
global AR
|
||||
global AS
|
||||
global NM
|
||||
global srcdir
|
||||
global subdir
|
||||
|
||||
set testname "ar symbol table"
|
||||
|
||||
if ![binutils_assemble $AS $srcdir/$subdir/bintest.s tmpdir/bintest.o] {
|
||||
unresolved $testname
|
||||
return
|
||||
}
|
||||
|
||||
binutils_remove tmpdir/artest.a
|
||||
|
||||
set got [binutils_run $AR "rc tmpdir/artest.a tmpdir/bintest.o"]
|
||||
if ![string match "" $got] {
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
|
||||
set got [binutils_run $NM "--print-armap tmpdir/artest.a"]
|
||||
if { ![string match "*text_symbol in bintest.o*" $got] \
|
||||
|| ![string match "*data_symbol in bintest.o*" $got] \
|
||||
|| ![string match "*common_symbol in bintest.o*" $got] \
|
||||
|| [string match "*static_text_symbol in bintest.o*" $got] \
|
||||
|| [string match "*static_data_symbol in bintest.o*" $got] \
|
||||
|| [string match "*external_symbol in bintest.o*" $got] } {
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
|
||||
pass $testname
|
||||
}
|
||||
|
||||
# Run the tests.
|
||||
|
||||
long_filenames
|
||||
symbol_table
|
@ -1,12 +0,0 @@
|
||||
.globl text_symbol
|
||||
.text
|
||||
text_symbol:
|
||||
static_text_symbol:
|
||||
.long 1
|
||||
.long external_symbol
|
||||
.globl data_symbol
|
||||
.data
|
||||
data_symbol:
|
||||
static_data_symbol:
|
||||
.long 2
|
||||
.comm common_symbol,4
|
@ -1,23 +0,0 @@
|
||||
.SPACE $PRIVATE$
|
||||
.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
|
||||
.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
|
||||
.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
|
||||
.IMPORT $global$,DATA
|
||||
.IMPORT $$dyncall,MILLICODE
|
||||
; gcc_compiled.:
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $CODE$
|
||||
|
||||
.align 4
|
||||
.EXPORT initialize_char_syntax,CODE
|
||||
.EXPORT initialize_char_syntax,ENTRY,PRIV_LEV=3,RTNVAL=GR
|
||||
initialize_char_syntax
|
||||
.PROC
|
||||
.CALLINFO FRAME=64,NO_CALLS,SAVE_SP,ENTRY_GR=3
|
||||
.ENTRY
|
||||
addil L'is_idchar-$global$-32,%r27
|
||||
.EXIT
|
||||
.PROCEND
|
||||
is_idchar .comm 256
|
@ -1,53 +0,0 @@
|
||||
# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
# (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.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-dejagnu@prep.ai.mit.edu
|
||||
|
||||
# This file was written by Rob Savoye <rob@cygnus.com>
|
||||
# and rewritten by Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
if ![istarget hppa*-*-*] then {
|
||||
return
|
||||
}
|
||||
|
||||
if {[which $OBJDUMP] == 0} then {
|
||||
perror "$OBJDUMP does not exist"
|
||||
return
|
||||
}
|
||||
|
||||
send_user "Version [binutil_version $OBJDUMP]"
|
||||
|
||||
if {![binutils_assemble $AS $srcdir/$subdir/addendbug.s tmpdir/addendbug.o]} then {
|
||||
return
|
||||
}
|
||||
|
||||
# Make sure the SOM BFD code sign extends constants in R_DATA_OVERRIDE fixups.
|
||||
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r tmpdir/addendbug.o"]
|
||||
|
||||
if [istarget hppa*-*-*elf*] then {
|
||||
set want "00000000 R_PARISC_DPREL21L\[ \]+is_idchar\\+0xffffffe0.*"
|
||||
} else {
|
||||
set want "00000000 R_DP_RELATIVE\[ \]+is_idchar\\+0xffffffe0.*"
|
||||
}
|
||||
|
||||
|
||||
if [regexp $want $got] then {
|
||||
pass "addendbug test"
|
||||
} else {
|
||||
fail "addendbug test"
|
||||
}
|
115
gnu/dist/binutils/testsuite/binutils-all/nm.exp
vendored
115
gnu/dist/binutils/testsuite/binutils-all/nm.exp
vendored
@ -1,115 +0,0 @@
|
||||
# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
# (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.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-dejagnu@prep.ai.mit.edu
|
||||
|
||||
# This file was written by Rob Savoye <rob@cygnus.com>
|
||||
# and rewritten by Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
if {[which $NM] == 0} then {
|
||||
perror "$NM does not exist"
|
||||
return
|
||||
}
|
||||
|
||||
send_user "Version [binutil_version $NM]"
|
||||
|
||||
|
||||
if {![binutils_assemble $AS $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then {
|
||||
return
|
||||
}
|
||||
|
||||
# Test nm with no arguments.
|
||||
|
||||
# This test does not work correctly on ECOFF targets, because ECOFF
|
||||
# stores most symbols twice, which messes up the nm output.
|
||||
setup_xfail "alpha*-*-osf*" "alpha*-*-netware*"
|
||||
setup_xfail "mips*-*-ultrix*" "mips*-*-ecoff*" "mips*-*-irix4*"
|
||||
setup_xfail "mips*-*-riscos*" "mips*-*-sysv3*" "mips*-sony-bsd*"
|
||||
|
||||
# This test does not work correctly on XCOFF targets, because XCOFF
|
||||
# does not enter static symbols in the symbol table.
|
||||
setup_xfail "*-*-aix*"
|
||||
|
||||
set got [binutils_run $NM "$NMFLAGS tmpdir/bintest.o"]
|
||||
|
||||
if [info exists vars] then { unset vars }
|
||||
while {[regexp "(\[a-zA-Z\]) (\[a-z_\]*_symbol)(.*)" $got all type symbol rest]} {
|
||||
set vars($symbol) $type
|
||||
set got $rest
|
||||
}
|
||||
|
||||
if {![info exists vars(text_symbol)] \
|
||||
|| $vars(text_symbol) != "T" \
|
||||
|| ![info exists vars(data_symbol)] \
|
||||
|| $vars(data_symbol) != "D" \
|
||||
|| ![info exists vars(common_symbol)] \
|
||||
|| $vars(common_symbol) != "C" \
|
||||
|| ![info exists vars(external_symbol)] \
|
||||
|| $vars(external_symbol) != "U" \
|
||||
|| ![info exists vars(static_text_symbol)] \
|
||||
|| $vars(static_text_symbol) != "t" \
|
||||
|| ![info exists vars(static_data_symbol)] \
|
||||
|| $vars(static_data_symbol) != "d"} {
|
||||
fail "nm (no arguments)"
|
||||
} else {
|
||||
pass "nm (no arguments)"
|
||||
}
|
||||
|
||||
# Test nm -g
|
||||
|
||||
set got [binutils_run $NM "$NMFLAGS -g tmpdir/bintest.o"]
|
||||
|
||||
if [info exists vars] then { unset vars }
|
||||
while {[regexp "(\[a-z_\]*_symbol)(.*)" $got all symbol rest]} {
|
||||
set vars($symbol) 1
|
||||
set got $rest
|
||||
}
|
||||
|
||||
if {![info exists vars(text_symbol)] \
|
||||
|| ![info exists vars(data_symbol)] \
|
||||
|| ![info exists vars(common_symbol)] \
|
||||
|| ![info exists vars(external_symbol)] \
|
||||
|| [info exists vars(static_text_symbol)] \
|
||||
|| [info exists vars(static_data_symbol)]} {
|
||||
fail "nm -g"
|
||||
} else {
|
||||
pass "nm -g"
|
||||
}
|
||||
|
||||
# Test nm -P
|
||||
|
||||
# This test does not work correctly on ECOFF targets, because ECOFF
|
||||
# stores most symbols twice, which messes up the nm output.
|
||||
setup_xfail "alpha*-*-osf*" "alpha*-*-netware*"
|
||||
setup_xfail "mips*-*-ultrix*" "mips*-*-ecoff*" "mips*-*-irix4*"
|
||||
setup_xfail "mips*-*-riscos*" "mips*-*-sysv3*" "mips*-sony-bsd*"
|
||||
|
||||
# This test does not work correctly on XCOFF targets, because XCOFF
|
||||
# does not enter static symbols in the symbol table.
|
||||
setup_xfail "*-*-aix*"
|
||||
|
||||
set got [binutils_run $NM "$NMFLAGS -P tmpdir/bintest.o"]
|
||||
|
||||
set want "common_symbol C \[0\]*4.*data_symbol D \[0-9a-fA-F\]*.*external_symbol U.*static_data_symbol d \[0-9a-fA-F\]*.*static_text_symbol t \[0-9a-fA-F\]*.*text_symbol T \[0-9a-fA-F\]*"
|
||||
|
||||
if [regexp $want $got] then {
|
||||
pass "nm -P"
|
||||
} else {
|
||||
fail "nm -P"
|
||||
}
|
||||
|
||||
# There are certainly other tests that could be run.
|
420
gnu/dist/binutils/testsuite/binutils-all/objcopy.exp
vendored
420
gnu/dist/binutils/testsuite/binutils-all/objcopy.exp
vendored
@ -1,420 +0,0 @@
|
||||
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
# (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.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-dejagnu@prep.ai.mit.edu
|
||||
|
||||
# Written by Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
if {[which $OBJCOPY] == 0} then {
|
||||
perror "$OBJCOPY does not exist"
|
||||
return
|
||||
}
|
||||
|
||||
send_user "Version [binutil_version $OBJCOPY]"
|
||||
|
||||
if {![binutils_assemble $AS $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then {
|
||||
unresolved "objcopy (simple copy)"
|
||||
return
|
||||
}
|
||||
|
||||
# Test that objcopy does not modify a file when copying it.
|
||||
|
||||
set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS tmpdir/bintest.o tmpdir/copy.o"]
|
||||
|
||||
if ![string match "" $got] then {
|
||||
fail "objcopy (simple copy)"
|
||||
} else {
|
||||
send_log "cmp tmpdir/bintest.o tmpdir/copy.o\n"
|
||||
verbose "cmp tmpdir/bintest.o tmpdir/copy.o"
|
||||
catch "exec cmp tmpdir/bintest.o tmpdir/copy.o" exec_output
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
|
||||
# On some systems the result of objcopy will not be identical.
|
||||
# Usually this is just because gas isn't using bfd to write the files
|
||||
# in the first place, and may order things a little differently.
|
||||
# Those systems should use setup_xfail here.
|
||||
|
||||
setup_xfail "sh-*-coff" "sh-*-hms"
|
||||
setup_xfail "arm-*-pe"
|
||||
setup_xfail "m68*-*-hpux*" "m68*-*-sunos*" "m68*-*-coff" "m68*-*-vxworks*"
|
||||
setup_xfail "m68*-ericsson-ose" "m68k*-motorola-sysv*"
|
||||
setup_xfail "i*86-*-linuxaout*" "i*86-*-aout*"
|
||||
setup_xfail "i*86-*-sysv3" "i*86-*-isc*" "i*86-*-sco*" "i*86-*-coff"
|
||||
setup_xfail "i*86-*-aix*" "i*86-*-go32*"
|
||||
setup_xfail "a29k-*-udi" "a29k-*-coff" "a29k-*-vxworks*"
|
||||
setup_xfail "i960-*-coff"
|
||||
setup_xfail "h8300-*-hms" "h8300-*-coff"
|
||||
setup_xfail "h8500-*-hms" "h8500-*-coff"
|
||||
setup_xfail "hppa*-*-*"
|
||||
clear_xfail "hppa*-*-*elf*"
|
||||
setup_xfail "m88*-*-coff" "m88*-motorola-sysv*"
|
||||
setup_xfail "z8*-*-coff"
|
||||
|
||||
if [string match "" $exec_output] then {
|
||||
pass "objcopy (simple copy)"
|
||||
} else {
|
||||
send_log "$exec_output\n"
|
||||
verbose "$exec_output" 1
|
||||
|
||||
# On OSF/1, this succeeds with gas and fails with /bin/as.
|
||||
setup_xfail "alpha*-*-osf*"
|
||||
|
||||
# This fails for COFF i960-vxworks targets.
|
||||
setup_xfail "i960-*-vxworks*"
|
||||
|
||||
fail "objcopy (simple copy)"
|
||||
}
|
||||
}
|
||||
|
||||
# Test generating S records.
|
||||
|
||||
set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -O srec tmpdir/bintest.o tmpdir/copy.srec"]
|
||||
|
||||
if ![string match "" $got] then {
|
||||
fail "objcopy -O srec"
|
||||
} else {
|
||||
set file [open tmpdir/copy.srec r]
|
||||
|
||||
# The first S record is fixed by the file name we are using.
|
||||
gets $file line
|
||||
send_log "$line\n"
|
||||
verbose $line
|
||||
if ![string match "S0130000746D706469722F636F70792E7372656397*" $line] {
|
||||
send_log "bad header\n"
|
||||
fail "objcopy -O srec"
|
||||
} else {
|
||||
while {[gets $file line] != -1 \
|
||||
&& [regexp "^S\[123\]\[0-9a-fA-F\]+\[\r\n\]*$" $line]} {
|
||||
send_log "$line\n"
|
||||
verbose $line
|
||||
set line "**EOF**"
|
||||
}
|
||||
send_log "$line\n"
|
||||
verbose $line
|
||||
if ![regexp "^S\[789\]\[0-9a-fA-F\]+\[\r\n\]*$" $line] then {
|
||||
send_log "bad trailer\n"
|
||||
fail "objcopy -O srec"
|
||||
} else {
|
||||
if {[gets $file line] != -1} then {
|
||||
send_log "garbage at end\n"
|
||||
send_log "$line\n"
|
||||
verbose $line
|
||||
fail "objcopy -O srec"
|
||||
} else {
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f tmpdir/copy.srec"]
|
||||
if ![regexp "file format srec" $got] then {
|
||||
send_log "objdump failed\n"
|
||||
fail "objcopy -O srec"
|
||||
} else {
|
||||
pass "objcopy -O srec"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
close $file
|
||||
}
|
||||
|
||||
# Test setting and adjusting the start address. We only test this
|
||||
# while generating S records, because we may not be able to set the
|
||||
# start address for other object file formats, and the S record case
|
||||
# is the only useful one anyhow.
|
||||
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f tmpdir/bintest.o"]
|
||||
if ![regexp "start address (\[0-9a-fA-FxX\]+)" $got all origstart] then {
|
||||
perror "objdump can not recognize bintest.o"
|
||||
set origstart ""
|
||||
} else {
|
||||
set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -O srec tmpdir/bintest.o tmpdir/copy.srec --set-start 0x7654"]
|
||||
if ![string match "" $got] then {
|
||||
fail "objcopy --set-start"
|
||||
} else {
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f tmpdir/copy.srec"]
|
||||
if ![regexp "file format srec.*start address (\[0-9a-fA-FxX\]+)" $got all srecstart] then {
|
||||
fail "objcopy --set-start"
|
||||
} else {
|
||||
if {$srecstart != 0x7654} then {
|
||||
send_log "$srecstart != 0x7654\n"
|
||||
fail "objcopy --set-start"
|
||||
} else {
|
||||
pass "objcopy --set-start"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -O srec tmpdir/bintest.o tmpdir/copy.srec --adjust-start 0x123"]
|
||||
if ![string match "" $got] then {
|
||||
fail "objcopy --adjust-start"
|
||||
} else {
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f tmpdir/copy.srec"]
|
||||
if ![regexp "file format srec.*start address (\[0-9a-fA-FxX\]+)" $got all srecstart] then {
|
||||
fail "objcopy --adjust-start"
|
||||
} else {
|
||||
if {$srecstart != $origstart + 0x123} then {
|
||||
send_log "$srecstart != $origstart + 0x123\n"
|
||||
fail "objcopy --adjust-start"
|
||||
} else {
|
||||
pass "objcopy --adjust-start"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Test adjusting the overall VMA, and adjusting the VMA of a
|
||||
# particular section. We again only test this when generating S
|
||||
# records.
|
||||
|
||||
set low ""
|
||||
set lowname ""
|
||||
|
||||
set headers [binutils_run $OBJDUMP "$OBJDUMPFLAGS -h tmpdir/bintest.o"]
|
||||
|
||||
set headers_regexp "\[ 0-9\]+(\[^ \]+)\[ \]*(\[0-9a-fA-F\]+)\[ \]+\[0-9a-fA-F\]+\[ \]+(\[0-9a-fA-F\]+)\[ \]+\[0-9a-fA-F\]+\[ \]+2\[*\]\[*\]\[0-9\]+(.*)"
|
||||
|
||||
set got $headers
|
||||
while {[regexp $headers_regexp $got all name size vma rest]} {
|
||||
set vma 0x$vma
|
||||
set size 0x$size
|
||||
if {$size != 0} {
|
||||
if {$low == "" || $vma < $low} {
|
||||
set low $vma
|
||||
set lowname $name
|
||||
}
|
||||
}
|
||||
set got $rest
|
||||
}
|
||||
|
||||
if {$low == "" || $origstart == ""} then {
|
||||
perror "objdump can not recognize bintest.o"
|
||||
} else {
|
||||
set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -O srec tmpdir/bintest.o tmpdir/copy.srec --adjust-vma 0x123"]
|
||||
if ![string match "" $got] then {
|
||||
fail "objcopy --adjust-vma"
|
||||
} else {
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -fh tmpdir/copy.srec"]
|
||||
set want "file format srec.*start address\[ \]*(\[0-9a-fA-FxX\]+).*sec1\[ \]+\[0-9a-fA-F\]+\[ \]+(\[0-9a-fA-F\]+)"
|
||||
if ![regexp $want $got all start vma] then {
|
||||
fail "objcopy --adjust-vma"
|
||||
} else {
|
||||
set vma 0x$vma
|
||||
if {$vma != $low + 0x123} then {
|
||||
send_log "$vma != $low + 0x123\n"
|
||||
fail "objcopy --adjust-vma"
|
||||
} else {
|
||||
if {$start != $origstart + 0x123} then {
|
||||
send_log "$start != $origstart + 0x123\n"
|
||||
fail "objcopy --adjust-vma"
|
||||
} else {
|
||||
pass "objcopy --adjust-vma"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set arg ""
|
||||
set got $headers
|
||||
while {[regexp $headers_regexp $got all name size vma rest]} {
|
||||
set vma 0x$vma
|
||||
if {$vma == $low} then {
|
||||
set arg "$arg --adjust-section-vma $name+4"
|
||||
}
|
||||
set got $rest
|
||||
}
|
||||
|
||||
set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -O srec tmpdir/bintest.o tmpdir/copy.srec $arg"]
|
||||
if ![string match "" $got] then {
|
||||
fail "objcopy --adjust-section-vma +"
|
||||
} else {
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -h tmpdir/copy.srec"]
|
||||
set want "file format srec.*sec1\[ \]+\[0-9a-fA-F\]+\[ \]+(\[0-9a-fA-F\]+)"
|
||||
if ![regexp $want $got all vma] then {
|
||||
fail "objcopy --adjust-section-vma +"
|
||||
} else {
|
||||
set vma 0x$vma
|
||||
if {$vma != $low + 4} then {
|
||||
send_log "$vma != $low + 4\n"
|
||||
fail "objcopy --adjust-section-vma +"
|
||||
} else {
|
||||
pass "objcopy --adjust-section-vma +"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
regsub -all "\\+4" $arg "=[expr $low + 4]" argeq
|
||||
set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS -O srec tmpdir/bintest.o tmpdir/copy.srec $argeq"]
|
||||
if ![string match "" $got] then {
|
||||
fail "objcopy --adjust-section-vma ="
|
||||
} else {
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -h tmpdir/copy.srec"]
|
||||
set want "file format srec.*sec1\[ \]+\[0-9a-fA-F\]+\[ \]+(\[0-9a-fA-F\]+)"
|
||||
if ![regexp $want $got all vma] then {
|
||||
fail "objcopy --adjust-section-vma ="
|
||||
} else {
|
||||
set vma 0x$vma
|
||||
if {$vma != $low + 4} then {
|
||||
send_log "$vma != $low + 4\n"
|
||||
fail "objcopy --adjust-section-vma ="
|
||||
} else {
|
||||
pass "objcopy --adjust-section-vma ="
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Test stripping an object.
|
||||
|
||||
proc strip_test { } {
|
||||
global CC
|
||||
global STRIP
|
||||
global STRIPFLAGS
|
||||
global NM
|
||||
global NMFLAGS
|
||||
global srcdir
|
||||
global subdir
|
||||
|
||||
set test "strip"
|
||||
|
||||
if { [which $CC] == 0 } {
|
||||
untested $test
|
||||
return
|
||||
}
|
||||
|
||||
if ![binutils_compile $CC "-g -c" $srcdir/$subdir/testprog.c tmpdir/testprog.o] {
|
||||
unresolved $test
|
||||
return
|
||||
}
|
||||
|
||||
set exec_output [binutils_run $STRIP "$STRIPFLAGS tmpdir/testprog.o"]
|
||||
if ![string match "" $exec_output] {
|
||||
fail $test
|
||||
return
|
||||
}
|
||||
|
||||
set exec_output [binutils_run $NM "-a $NMFLAGS tmpdir/testprog.o"]
|
||||
if ![string match "No symbols in *" $exec_output] {
|
||||
fail $test
|
||||
return
|
||||
}
|
||||
|
||||
pass $test
|
||||
}
|
||||
|
||||
strip_test
|
||||
|
||||
# Build a final executable.
|
||||
|
||||
proc copy_setup { } {
|
||||
global CC
|
||||
global srcdir
|
||||
global subdir
|
||||
|
||||
if ![isnative] {
|
||||
return 1
|
||||
}
|
||||
|
||||
if { [which $CC] == 0 } {
|
||||
return 2
|
||||
}
|
||||
|
||||
if ![binutils_compile $CC "-g" $srcdir/$subdir/testprog.c tmpdir/testprog] {
|
||||
return 3
|
||||
}
|
||||
|
||||
set exec_output [binutils_run tmpdir/testprog ""]
|
||||
if ![string match "ok" $exec_output] {
|
||||
return 3
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# Test copying an executable.
|
||||
|
||||
proc copy_executable { prog flags test1 test2 } {
|
||||
|
||||
set exec_output [binutils_run $prog "$flags tmpdir/testprog tmpdir/copyprog"]
|
||||
if ![string match "" $exec_output] {
|
||||
fail $test1
|
||||
fail $test2
|
||||
return
|
||||
}
|
||||
|
||||
set exec_output [binutils_run "cmp" "tmpdir/testprog tmpdir/copyprog"]
|
||||
|
||||
if [string match "" $exec_output] then {
|
||||
pass $test1
|
||||
} else {
|
||||
send_log "$exec_output\n"
|
||||
verbose "$exec_output"
|
||||
# This will fail for many reasons. For example, it will most
|
||||
# likely fail if the system linker is used. Therefore, we do
|
||||
# not insist that it pass. If you are using an assembler and
|
||||
# linker based on the same BFD as objcopy, it is worth
|
||||
# investigating to see why this failure occurs.
|
||||
setup_xfail "*-*-*"
|
||||
fail $test1
|
||||
}
|
||||
|
||||
set exec_output [binutils_run tmpdir/copyprog ""]
|
||||
if ![string match "ok" $exec_output] {
|
||||
fail $test2
|
||||
} else {
|
||||
pass $test2
|
||||
}
|
||||
}
|
||||
|
||||
# Test stripping an executable
|
||||
|
||||
proc strip_executable { prog flags test } {
|
||||
|
||||
set exec_output [binutils_run $prog "$flags tmpdir/copyprog"]
|
||||
if ![string match "" $exec_output] {
|
||||
fail $test
|
||||
return
|
||||
}
|
||||
|
||||
set exec_output [binutils_run tmpdir/copyprog ""]
|
||||
if ![string match "ok" $exec_output] {
|
||||
fail $test
|
||||
} else {
|
||||
pass $test
|
||||
}
|
||||
}
|
||||
|
||||
set test1 "simple objcopy of executable"
|
||||
set test2 "run objcopy of executable"
|
||||
set test3 "run stripped executable"
|
||||
|
||||
switch [copy_setup] {
|
||||
"1" {
|
||||
# do nothing
|
||||
}
|
||||
"2" {
|
||||
untested $test1
|
||||
untested $test2
|
||||
untested $test3
|
||||
}
|
||||
"3" {
|
||||
unresolved $test1
|
||||
unresolved $test2
|
||||
unresolved $test3
|
||||
}
|
||||
"0" {
|
||||
copy_executable "$OBJCOPY" "$OBJCOPYFLAGS" "$test1" "$test2"
|
||||
strip_executable "$STRIP" "$STRIPFLAGS" "$test3"
|
||||
}
|
||||
}
|
128
gnu/dist/binutils/testsuite/binutils-all/objdump.exp
vendored
128
gnu/dist/binutils/testsuite/binutils-all/objdump.exp
vendored
@ -1,128 +0,0 @@
|
||||
# Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
# (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.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-dejagnu@prep.ai.mit.edu
|
||||
|
||||
# This file was written by Rob Savoye <rob@cygnus.com>
|
||||
# and rewritten by Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
if {[which $OBJDUMP] == 0} then {
|
||||
perror "$OBJDUMP does not exist"
|
||||
return
|
||||
}
|
||||
|
||||
send_user "Version [binutil_version $OBJDUMP]"
|
||||
|
||||
# Simple test of objdump -i
|
||||
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -i"]
|
||||
|
||||
set cpus_expected "(a29k|alliant|alpha|arm|convex|d10v|h8|hppa|i386|i860|i960|m32r|m68k|m88k|mips|mn10200|mn10300|ns32k|powerpc|pyramid|romp|rs6000|sh|sparc|tahoe|vax|we32k|z8k|z8001|z8002)"
|
||||
|
||||
set want "BFD header file version.*srec.*header .* endian.*, data .* endian.*$cpus_expected"
|
||||
|
||||
if [regexp $want $got] then {
|
||||
pass "objdump -i"
|
||||
} else {
|
||||
fail "objdump -i"
|
||||
}
|
||||
|
||||
# The remaining tests require a test file.
|
||||
|
||||
|
||||
if {![binutils_assemble $AS $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then {
|
||||
return
|
||||
}
|
||||
|
||||
# Test objdump -f
|
||||
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f tmpdir/bintest.o"]
|
||||
|
||||
set want "tmpdir/bintest.o:\[ \]*file format.*architecture:\[ \]*${cpus_expected}.*HAS_RELOC.*HAS_SYMS"
|
||||
|
||||
if ![regexp $want $got] then {
|
||||
fail "objdump -f"
|
||||
} else {
|
||||
pass "objdump -f"
|
||||
}
|
||||
|
||||
# Test objdump -h
|
||||
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -h tmpdir/bintest.o"]
|
||||
|
||||
set want "tmpdir/bintest.o:\[ \]*file format.*Sections.*\[0-9\]+\[ \]+\[^ \]*(text|TEXT|\\\$CODE\\\$)\[^ \]*\[ \]*(\[0-9a-fA-F\]+).*\[0-9\]+\[ \]+\[^ \]*(data|DATA)\[^ \]*\[ \]*(\[0-9a-fA-F\]+)"
|
||||
|
||||
if ![regexp $want $got all text_name text_size data_name data_size] then {
|
||||
fail "objdump -h"
|
||||
} else {
|
||||
verbose "text name is $text_name size is $text_size"
|
||||
verbose "data name is $data_name size is $data_size"
|
||||
if {[expr "0x$text_size"] < 8 || [expr "0x$data_size"] < 4} then {
|
||||
send_log "sizes too small\n"
|
||||
fail "objdump -h"
|
||||
} else {
|
||||
pass "objdump -h"
|
||||
}
|
||||
}
|
||||
|
||||
# Test objdump -t
|
||||
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -t tmpdir/bintest.o"]
|
||||
|
||||
if [info exists vars] then { unset vars }
|
||||
while {[regexp "(\[a-z\]*_symbol)(.*)" $got all symbol rest]} {
|
||||
set vars($symbol) 1
|
||||
set got $rest
|
||||
}
|
||||
|
||||
if {![info exists vars(text_symbol)] \
|
||||
|| ![info exists vars(data_symbol)] \
|
||||
|| ![info exists vars(common_symbol)] \
|
||||
|| ![info exists vars(external_symbol)]} then {
|
||||
fail "objdump -t"
|
||||
} else {
|
||||
pass "objdump -t"
|
||||
}
|
||||
|
||||
# Test objdump -r
|
||||
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r tmpdir/bintest.o"]
|
||||
|
||||
set want "tmpdir/bintest.o:\[ \]*file format.*RELOCATION RECORDS FOR \\\[\[^\]\]*(text|TEXT|\\\$CODE\\\$)\[^\]\]*\\\].*external_symbol"
|
||||
|
||||
if [regexp $want $got] then {
|
||||
pass "objdump -r"
|
||||
} else {
|
||||
fail "objdump -r"
|
||||
}
|
||||
|
||||
# Test objdump -s
|
||||
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -s tmpdir/bintest.o"]
|
||||
|
||||
set want "tmpdir/bintest.o:\[ \]*file format.*Contents.*(text|TEXT|\\\$CODE\\\$)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000001|01000000).*Contents.*(data|DATA)\[^0-9\]*\[ \]*\[0-9a-fA-F\]*\[ \]*(00000002|02000000)"
|
||||
|
||||
if [regexp $want $got] then {
|
||||
pass "objdump -s"
|
||||
} else {
|
||||
fail "objdump -s"
|
||||
}
|
||||
|
||||
# Options which are not tested: -a -d -D -R -T -x -l --stabs
|
||||
# I don't see any generic way to test any of these other than -a.
|
||||
# Tests could be written for specific targets, and that should be done
|
||||
# if specific problems are found.
|
@ -1,70 +0,0 @@
|
||||
# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
# (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.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-dejagnu@prep.ai.mit.edu
|
||||
|
||||
# This file was written by Rob Savoye <rob@cygnus.com>
|
||||
# and rewritten by Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
if {[which $SIZE] == 0} then {
|
||||
perror "$SIZE does not exist"
|
||||
return
|
||||
}
|
||||
|
||||
send_user "Version [binutil_version $SIZE]"
|
||||
|
||||
|
||||
if {![binutils_assemble $AS $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then {
|
||||
return
|
||||
}
|
||||
|
||||
set dec "\[0-9\]+"
|
||||
set hex "\[0-9a-fA-F\]+"
|
||||
|
||||
# Test size with no arguments
|
||||
|
||||
set got [binutils_run $SIZE "$SIZEFLAGS tmpdir/bintest.o"]
|
||||
|
||||
set want "($dec)\[ \]+($dec)\[ \]+($dec)\[ \]+($dec)\[ \]+($hex)\[ \]+tmpdir/bintest.o"
|
||||
|
||||
if ![regexp $want $got all text data bss dtot hextot] then {
|
||||
fail "size (no arguments)"
|
||||
} else {
|
||||
if {$text < 8 || $data < 4} then {
|
||||
fail "size (no arguments)"
|
||||
} else {
|
||||
pass "size (no arguments)"
|
||||
}
|
||||
}
|
||||
|
||||
# Test size -A
|
||||
|
||||
set got [binutils_run $SIZE "$SIZEFLAGS -A tmpdir/bintest.o"]
|
||||
|
||||
set want "tmpdir/bintest.o.*(text|TEXT)\[^\n\r\]*\[ \]($dec)\[ \]+$dec.*(data|DATA)\[^\n\r\]*\[ \]($dec)\[ \]+$dec"
|
||||
|
||||
if ![regexp $want $got all textname textsize dataname datasize] then {
|
||||
fail "size -A"
|
||||
} else {
|
||||
verbose "text size: $textsize"
|
||||
verbose "data size: $datasize"
|
||||
if {$textsize < 8 || $datasize < 4} then {
|
||||
fail "size -A"
|
||||
} else {
|
||||
pass "size -A"
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
/* This program is used to test objcopy and strip. */
|
||||
|
||||
int common;
|
||||
int global = 1;
|
||||
static int local = 2;
|
||||
static char string[] = "string";
|
||||
|
||||
int
|
||||
fn ()
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (common != 0
|
||||
|| global != 1
|
||||
|| local != 2
|
||||
|| strcmp (string, "string") != 0)
|
||||
{
|
||||
printf ("failed\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
printf ("ok\n");
|
||||
exit (0);
|
||||
}
|
113
gnu/dist/binutils/testsuite/config/default.exp
vendored
113
gnu/dist/binutils/testsuite/config/default.exp
vendored
@ -1,113 +0,0 @@
|
||||
# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
# (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.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-dejagnu@prep.ai.mit.edu
|
||||
|
||||
# This file was written by Rob Savoye. (rob@cygnus.com)
|
||||
|
||||
load_lib util-defs.exp
|
||||
load_lib utils-lib.exp
|
||||
|
||||
if ![info exists AS] then {
|
||||
set AS [findfile $base_dir/../gas/as.new $base_dir/../gas/as.new [transform as]]
|
||||
}
|
||||
if ![info exists ASFLAGS] then {
|
||||
set ASFLAGS ""
|
||||
}
|
||||
|
||||
if ![info exists NM] then {
|
||||
set NM [findfile $base_dir/nm.new $base_dir/nm.new [transform nm]]
|
||||
}
|
||||
if ![info exists NMFLAGS] then {
|
||||
set NMFLAGS ""
|
||||
}
|
||||
|
||||
if ![info exists SIZE] then {
|
||||
set SIZE [findfile $base_dir/size]
|
||||
}
|
||||
if ![info exists SIZEFLAGS] then {
|
||||
set SIZEFLAGS ""
|
||||
}
|
||||
|
||||
if ![info exists OBJDUMP] then {
|
||||
set OBJDUMP [findfile $base_dir/objdump]
|
||||
}
|
||||
if ![info exists OBJDUMPFLAGS] then {
|
||||
set OBJDUMPFLAGS ""
|
||||
}
|
||||
|
||||
if ![info exists OBJCOPY] then {
|
||||
set OBJCOPY [findfile $base_dir/objcopy]
|
||||
}
|
||||
if ![info exists OBJCOPYFLAGS] then {
|
||||
set OBJCOPYFLAGS ""
|
||||
}
|
||||
|
||||
if ![info exists AR] then {
|
||||
set AR [findfile $base_dir/ar]
|
||||
}
|
||||
|
||||
if ![info exists STRIP] then {
|
||||
set STRIP [findfile $base_dir/strip.new $base_dir/strip.new [transform strip]]
|
||||
}
|
||||
if ![info exists STRIPFLAGS] then {
|
||||
set STRIPFLAGS ""
|
||||
}
|
||||
|
||||
if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
|
||||
|
||||
#
|
||||
# binutils_run
|
||||
# run a program, returning the output
|
||||
# sets binutils_run_failed if the program does not exist
|
||||
#
|
||||
proc binutils_run { prog progargs } {
|
||||
default_binutils_run $prog $progargs
|
||||
}
|
||||
|
||||
#
|
||||
# binutils_assemble
|
||||
# assemble a file
|
||||
#
|
||||
proc binutils_assemble { as source object } {
|
||||
default_binutils_assemble $as $source $object
|
||||
}
|
||||
|
||||
#
|
||||
# binutils_compile
|
||||
# compile a file
|
||||
#
|
||||
proc binutils_compile { cc flags source object } {
|
||||
default_binutils_compile $cc $flags $source $object
|
||||
}
|
||||
|
||||
#
|
||||
# binutils_remove
|
||||
# remove a file
|
||||
#
|
||||
proc binutils_remove { file } {
|
||||
default_binutils_remove $file
|
||||
}
|
||||
|
||||
#
|
||||
# add some basic error trapping. These mostly catch programming error's
|
||||
# within the tests themselves
|
||||
#
|
||||
expect_before {
|
||||
buffer_full { perror "internal buffer is full." }
|
||||
"can't open '*'" { perror "Can't open test file." }
|
||||
}
|
4
gnu/dist/binutils/testsuite/config/hppa.sed
vendored
4
gnu/dist/binutils/testsuite/config/hppa.sed
vendored
@ -1,4 +0,0 @@
|
||||
s/# Old OSF sed blows up if you have a sed command starting with "#"//
|
||||
s/# Avoid it by putting the comments within real sed commands.//
|
||||
s/# Fix the definition of common_symbol to be correct for the PA assebmlers.//
|
||||
s/ \.comm common_symbol,4/common_symbol .comm 4/
|
189
gnu/dist/binutils/testsuite/lib/utils-lib.exp
vendored
189
gnu/dist/binutils/testsuite/lib/utils-lib.exp
vendored
@ -1,189 +0,0 @@
|
||||
# Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
# (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.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-dejagnu@prep.ai.mit.edu
|
||||
|
||||
# This file was written by Rob Savoye <rob@cygnus.com>
|
||||
# and extended by Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
proc binutil_version { prog } {
|
||||
if {[which $prog] == 0} then {
|
||||
perror "$prog can't be run, file not found."
|
||||
return ""
|
||||
}
|
||||
catch "exec $prog --version" tmp
|
||||
# Should find a way to discard constant parts, keep whatever's
|
||||
# left, so the version string could be almost anything at all...
|
||||
regexp "\[^\n\]* (cygnus-|)(\[-0-9.a-zA-Z-\]+)\[\r\n\].*" $tmp version cyg number
|
||||
if ![info exists number] then {
|
||||
return "[which $prog] (no version number)\n"
|
||||
}
|
||||
return "[which $prog] $number\n"
|
||||
}
|
||||
|
||||
#
|
||||
# default_binutils_run
|
||||
# run a program, returning the output
|
||||
# sets binutils_run_failed if the program does not exist
|
||||
#
|
||||
proc default_binutils_run { prog progargs } {
|
||||
global binutils_run_failed
|
||||
global host_triplet
|
||||
|
||||
set binutils_run_failed 0
|
||||
|
||||
if {[which $prog] == 0} then {
|
||||
perror "$prog does not exist"
|
||||
set binutils_run_failed 1
|
||||
return ""
|
||||
}
|
||||
|
||||
send_log "$prog $progargs\n"
|
||||
verbose "$prog $progargs"
|
||||
|
||||
# This used to be
|
||||
# catch "exec $prog $progargs" exec_output
|
||||
# but that would evaluate $progargs twice, which would fail if
|
||||
# any arguments started with `$'. This is a dismal hack to avoid
|
||||
# this problem. I tried using
|
||||
# catch { exec $prog $progargs } exec_output
|
||||
# but that failed because $progargs was not split into words by
|
||||
# exec. I don't know if this operation can be done correctly. No
|
||||
# matter how hard I try, I can not convince myself that TCL is a
|
||||
# language.
|
||||
regsub -all "\\$" $progargs "\\$" progq
|
||||
catch "exec $prog $progq" exec_output
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
if {![string match "" $exec_output]} then {
|
||||
send_log "$exec_output\n"
|
||||
verbose "$exec_output"
|
||||
}
|
||||
return $exec_output
|
||||
}
|
||||
|
||||
#
|
||||
# default_binutils_assemble
|
||||
# assemble a file
|
||||
#
|
||||
proc default_binutils_assemble { as source object } {
|
||||
global ASFLAGS
|
||||
global srcdir
|
||||
global host_triplet
|
||||
|
||||
if {[which $as] == 0} then {
|
||||
perror "$as does not exist"
|
||||
return 0
|
||||
}
|
||||
|
||||
if ![info exists ASFLAGS] { set ASFLAGS "" }
|
||||
|
||||
# The HPPA assembler syntax is a little different than most, to make
|
||||
# the test source file assemble we need to run it through sed.
|
||||
#
|
||||
# This is a hack in that it won't scale well if other targets need
|
||||
# similar transformations to assemble. We'll generalize the hack
|
||||
# if/when other targets need similar handling.
|
||||
if [istarget "hppa*-*-*" ] then {
|
||||
send_log "sed -f $srcdir/config/hppa.sed < $source | $as $ASFLAGS -o $object\n"
|
||||
verbose "sed -f $srcdir/config/hppa.sed < $source | $as $ASFLAGS -o $object"
|
||||
catch "exec sed -f $srcdir/config/hppa.sed < $source | $as $ASFLAGS -o $object" exec_output
|
||||
} else {
|
||||
send_log "$as $ASFLAGS -o $object $source\n"
|
||||
verbose "$as $ASFLAGS -o $object $source"
|
||||
catch "exec $as $ASFLAGS -o $object $source" exec_output
|
||||
}
|
||||
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
|
||||
if [string match "" $exec_output] then {
|
||||
return 1
|
||||
} else {
|
||||
send_log "$exec_output\n"
|
||||
verbose "$exec_output"
|
||||
perror "$source: assembly failed"
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# default_binutils_compile
|
||||
# compile a file
|
||||
#
|
||||
proc default_binutils_compile { cc flags source object } {
|
||||
global CFLAGS
|
||||
global srcdir
|
||||
global host_triplet
|
||||
|
||||
if {[which $cc] == 0} then {
|
||||
perror "$cc does not exist"
|
||||
return 0
|
||||
}
|
||||
|
||||
if ![info exists CFLAGS] { set CFLAGS "" }
|
||||
|
||||
send_log "$cc $flags $CFLAGS -o $object $source\n"
|
||||
verbose "$cc $flags $CFLAGS -o $object $source"
|
||||
catch "exec $cc $flags $CFLAGS -o $object $source" exec_output
|
||||
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
|
||||
if [string match "" $exec_output] then {
|
||||
return 1
|
||||
} else {
|
||||
send_log "$exec_output\n"
|
||||
verbose "$exec_output"
|
||||
perror "$source: compilation failed"
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# default_binutils_remove
|
||||
# remove a file
|
||||
#
|
||||
proc default_binutils_remove { file } {
|
||||
catch "exec rm -f $file" exec_output
|
||||
}
|
||||
|
||||
# This definition is taken from an unreleased version of DejaGnu. Once
|
||||
# that version gets released, and has been out in the world for a few
|
||||
# months at least, it may be safe to delete this copy.
|
||||
if ![string length [info proc prune_warnings]] {
|
||||
#
|
||||
# prune_warnings -- delete various system verbosities from TEXT
|
||||
#
|
||||
# An example is:
|
||||
# ld.so: warning: /usr/lib/libc.so.1.8.1 has older revision than expected 9
|
||||
#
|
||||
# Sites with particular verbose os's may wish to override this in site.exp.
|
||||
#
|
||||
proc prune_warnings { text } {
|
||||
# This is from sun4's. Do it for all machines for now.
|
||||
# The "\\1" is to try to preserve a "\n" but only if necessary.
|
||||
regsub -all "(^|\n)(ld.so: warning:\[^\n\]*\n?)+" $text "\\1" text
|
||||
|
||||
# This happens when compiling on Alpha OSF/1 with cc -g -O.
|
||||
regsub -all "(^|\n)(\n*uopt: Warning: file not optimized; use -g3 if both optimization and debug wanted\n?)+" $text "\\1" text
|
||||
|
||||
# This happens on SunOS with cc -g -O.
|
||||
regsub -all "(^|\n)(cc: Warning: -O conflicts with -g. -O turned off.\n?)+" $text "\\1" text
|
||||
|
||||
# It might be tempting to get carried away and delete blank lines, etc.
|
||||
# Just delete *exactly* what we're ask to, and that's it.
|
||||
return $text
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user