Nuke ld testsuite (wasn't updated with 2.9.1, and can be obtained via

third party sources)
This commit is contained in:
tv 1999-02-02 20:34:12 +00:00
parent f226c2f097
commit 586a0960e7
107 changed files with 0 additions and 5920 deletions

View File

@ -1,439 +0,0 @@
Mon May 12 11:17:55 1997 Ian Lance Taylor <ian@cygnus.com>
* config/default.exp: Use $base_dir rather than $objdir when
setting ld. From John David Anglin <dave@hiauly1.hia.nrc.ca>.
Wed Mar 26 13:56:10 1997 Ian Lance Taylor <ian@cygnus.com>
* ld-srec/srec.exp: Don't expect failures on mips*-*-elf*.
Mon Mar 17 19:27:13 1997 Ian Lance Taylor <ian@cygnus.com>
* ld-elfvers/vers.exp: Don't run on SunOS or AIX.
Wed Mar 12 21:44:19 1997 Eric Youngdale <eric@andante.jic.com>
* ld-elfvers/vers.exp, *: New tests for symbol versioning.
* config/default.exp: Set ar and strip.
Fri Feb 7 16:47:02 1997 Bob Manson <manson@charmed.cygnus.com>
* ld-bootstrap/bootstrap.exp: Use prune_warnings instead of
prune_system_crud.
* ld-cdtest/cdtest.exp: Ditto.
* ld-scripts/crossref.exp: Ditto.
* ld-sh/sh.exp: Ditto.
* ld-shared/shared.exp: Ditto.
* ld-srec/srec.exp: Ditto.
* lib/ld.exp: Ditto.
Wed Jan 29 00:47:29 1997 Bob Manson <manson@charmed.cygnus.com>
* ld-cdtest/cdtest.exp: Put a slash between $srcdir/$subdir.
* ld-scripts/script.exp: Ditto.
* ld-sh/sh.exp: Ditto.
* ld-undefined/undefined.exp: Ditto.
* ld-versados/versados.exp: Ditto.
* lib/ld.exp: Ditto.
Mon Dec 30 17:08:04 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-scripts/crossref.exp: Fix quoting for --defsym $global$.
Tue Oct 1 15:52:31 1996 Ian Lance Taylor <ian@cygnus.com>
* lib/ld.exp (default_ld_version): Fix for current version
printing.
Fri Sep 13 15:51:45 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-scripts/crossref.exp: Define $global$ for hppa-elf.
Thu Aug 8 14:29:32 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-scripts/cross2.t: Map XCOFF sections to .text or .data.
* lib/ld.exp: Use verbose -log instead of calling both verbose and
send_log.
Wed Aug 7 18:00:58 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-scripts/phdrs.exp: New test.
* ld-scripts/phdrs.s, ld-scripts/phdrs.t: New files.
Sun Aug 4 21:58:12 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-scripts/crossref.exp: On a29k targets, use --defsym to define
V_SPILL and V_FILL.
Thu Aug 1 14:10:27 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-scripts/crossref.exp: New test.
* ld-scripts/{cross1.c, cross2.c, cross3.c}: New files.
* ld-scripts/{cross1.t, cross2.t}: New files.
Sat Jun 29 13:40:11 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-sh/sh.exp: Fix debugging messages.
* ld-sh/sh1.s: Use .align 4.
Wed May 1 16:45:13 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-sh/sh.exp: Use -O when compiling with -mrelax.
Mon Apr 29 10:33:10 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* ld-shared/shared.exp: Run the shared library tests on
Linux/m68k.
Fri Apr 5 16:20:55 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-shared/shared.exp: Run the shared library tests on Linux.
Mon Feb 26 12:45:26 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-shared/shared.exp: Don't use -fpic on MIPS targets.
Wed Jan 31 15:09:57 1996 Jeffrey A Law (law@cygnus.com)
* ld-srec/srec.exp: Add xfails for hppa*-*-*elf*.
* ld-undefined/undefined.exp: Likewise.
Fri Jan 26 18:43:03 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-undefined/undefined.exp: ELF targets should now pass the
undefined line test.
Thu Jan 25 15:36:13 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-empic/empic.exp: Update for change to MIPS disassembler.
Mon Jan 15 15:05:53 1996 Ian Lance Taylor <ian@cygnus.com>
* ld-bootstrap/bootstrap.exp: Expect failure for mips*-*-irix5*
when doing the --static test.
* ld-shared/shared.exp: Run tests on mips*-*-irix5*.
Fri Dec 29 12:33:09 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-bootstrap/bootstrap.exp: On AIX, don't pass the -bI option
when creating ld-partial.o.
Tue Dec 26 17:37:23 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-srec/srec.exp: If powerpc*-*-eabi*, use --defsym to define
__eabi.
Tue Dec 19 18:01:01 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-srec/srec.exp: Add setup_xfails for XCOFF targets.
Fri Dec 15 16:36:17 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-srec/srec.exp: On a29k targets, use --defsym to define
V_SPILL and V_FILL.
* ld-srec/sr1.c (V_SPILL, V_FILL): Remove definitions.
* ld-srec/sr3.cc: Likewise.
* ld-srec/srec.exp: Remove i960 COFF setup_xfail.
Sat Dec 2 01:20:31 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-srec/srec.exp: Don't use [] in setup_xfail expressions.
Fri Dec 1 13:18:18 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-srec/srec.exp: Add setup_xfails for MIPS ELF targets.
Wed Nov 29 13:01:10 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-srec/srec.exp: Add setup_xfail for i960 COFF targets.
Mon Nov 27 14:36:11 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-srec/srec.exp: Add setup_xfail calls for i[345]86-*-aout*.
* ld-srec/sr1.c (V_SPILL, V_FILL): Define.
* ld-srec/sr3.cc: Likewise.
Tue Nov 21 16:05:53 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-empic/empic.exp: Update for changes in objdump output.
Wed Nov 15 17:42:48 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-srec/srec.exp: New tests.
* ld-srec/sr1.c, ld-srec/sr2.c, ld-srec/sr3.cc: New files.
* lib/ld.exp (ld_simple_link): Discard warnings about not being
able to find the entry symbol.
Tue Nov 14 20:03:54 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-sh/sh2.c (__main): Define.
Mon Nov 6 14:39:18 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-empic/empic.exp: Accept a . in the address symbol.
* ld-shared/shared.exp: Run tests on rs6000*-*-aix* and
powerpc*-*-aix*. Add code to create appropriate exports files,
and pass appropriate compilation flags, and test against
appropriate expected output.
* ld-shared/xcoff.dat: New file.
* ld-shared/main.c: Put #ifndef XCOFF_TEST around tests that can
not be linked using XCOFF. Use shlib_shlibvar1 as a sample
function pointer, rather than shlib_mainvar.
* ld-shared/sh1.c: Likewise.
* ld-shared/shared.dat: Update for change from using shlib_mainvar
to using shlib_shlibvar1.
* ld-shared/sun4.dat: Likewise.
Sat Oct 28 01:54:25 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-scripts/script.t: Put .pr in .text, and .rw in .data, for
convenience when testing XCOFF.
Thu Oct 26 22:53:17 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-bootstrap/bootstrap.exp: On AIX, pass -bI/lib/syscalls.exp
along with --static.
* ld-scripts/script.s: Make symbols global.
Fri Oct 20 12:22:16 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-undefined/undefined.exp: Add setup_xfails for arm*-*-pe*.
Fri Sep 29 11:06:10 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-undefined/undefined.exp: Use -e when invoking the linker, to
prevent the SunOS linker from trying to create a shared library.
Thu Sep 28 12:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-shared/shared.exp: Run the tests on sparc*-*-sunos4*. Add
appropriate modifications and setup_xfails.
* ld-shared/sun4.dat: New file.
Mon Sep 18 14:12:56 1995 Ian Lance Taylor <ian@cygnus.com>
* lib/ld.exp (default_ld_version): Call prune_system_crud.
(default_ld_relocate, default_ld_link): Likewise.
(default_ld_simple_link, default_ld_compile): Likewise.
(default_ld_assemble, default_ld_nm): Likewise.
Fri Sep 8 17:15:38 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-cdtest/cdtest.exp: If the compiler does not exist, mark the
tests as untested rather than unresolved.
Wed Aug 23 10:46:38 1995 Ian Lance Taylor (ian@cygnus.com)
* ld-sh/sh.exp: Call prune_system_crud on the output of cmp.
Tue Aug 15 17:35:35 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-scripts/script.exp: Split script verification into a proc.
Add simple test of MRI script.
* ld-scripts/scriptm.t: New file.
Wed Jul 26 11:38:58 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-sh/sh.exp: Mark `SH confirm relaxing' test unresolved when
appropriate.
Mon Jul 24 15:34:31 1995 Ian Lance Taylor <ian@cygnus.com>
* config/default.exp: Define objcopy if it is not defined.
* ld-sh/*: New tests for SH relaxing.
* ld-empic/empic.exp: If $CC does not exist, call untested rather
than unresolved.
Thu Jul 20 15:09:26 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-undefined/undefined.exp: If $CC does not exist, mark the
tests as untested rather than unresolved. Clear ELF xfails for
mips*, not just mips.
Tue Jul 18 12:00:41 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-undefined/undefined.exp: Add setup_xfail for sh-*-* for
undefined line test.
Fri Jul 14 13:07:48 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-undefined/undefined.exp: New test, to check reporting of
undefined symbols.
* ld-undefined/undefined.c: New file.
Mon Jul 10 11:13:39 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-versados/versados.exp: If a test fails, report it correctly:
don't try to run the next test, and don't report a pass as well as
a fail.
Mon Jul 3 14:26:37 1995 Steve Chamberlain <sac@slash.cygnus.com>
* ld/testsuite/versados/(t1,t2).ld: End in newlines.
Mon May 22 20:19:38 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
* lib/ld.exp (default_ld_compile): If cc argument is multiple
words, use only the first when trying to verify the availability
of the compiler.
Mon Feb 6 11:46:49 1995 Ian Lance Taylor <ian@cygnus.com>
* ld-scripts/defined.t: Mention .data and .bss explicitly.
Tue Jan 24 14:51:48 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
* ld-bootstrap/bootstrap.exp: If not in the ld build directory,
call untested for each test, rather than ignoring it. If one test
fails, go on to the next one instead of returning.
* ld-cdtest/cdtest.exp: If compilations fail, mark tests as
unresolved.
* ld-empic/empic.exp: Likewise. Also, always pass the same test
name to pass or fail.
* ld-shared/shared.exp: Likewise. Also, always run all tests.
* ld-scripts/defined.exp: If as or nm fail, mark test as
unresolved. Always pass the same test name to pass or fail.
* ld-scripts/script.exp: Likewise.
* ld-scripts/sizeof.exp: Likewise.
Wed Jan 11 11:48:31 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
* ld-scripts/sizeof.exp: New test, based on bug report from
anders.blomdell@control.lth.se.
* ld-scripts/sizeof.s: New file.
* ld-scripts/sizeof.t: New file.
Wed Jan 4 18:56:27 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
* lib/ld.exp: Use [which $ld] rather than [file exists $ld] to see
if the linker exists.
Wed Dec 14 16:39:03 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
* lib/ld.exp (prune_system_crud): Define if not already defined,
in case the user isn't using the newest DejaGnu version that we
haven't released to the net yet.
Fri Dec 2 14:17:02 1994 Ian Lance Taylor <ian@rtl.cygnus.com>
* config/default.exp: Define objdump if it is not defined.
* ld-empic/*: New tests to test -membedded-pic code.
Mon Nov 28 11:24:36 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
* ld-bootstrap/bootstrap.exp: Pass cmp output through
prune_system_crud.
* ld-cdtest/cdtest.exp: Pass diff output through
prune_system_crud.
* ld-shared/shared.exp: Likewise.
* config/default.exp: Remove unused and useless proc ld_load.
Sun Oct 30 13:02:34 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
* lib/ld.exp (default_ld_compile): Remove the output file before
compiling.
* ld-shared/shared.exp: Move common test code into a procedure.
Add tests for compiling the non shared code PIC.
* ld-shared/main.c (main): Call main_called, and print the result.
* ld-shared/shared.dat: Adjust accordingly.
Thu Oct 27 17:30:12 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
* ld-shared: New directory, with new files to test generating ELF
shared libraries.
* lib/ld.exp (default_ld_compile): If the compilation worked, but
no object file was created, check to see if the compiler foolishly
ignored the -o switch when compiling, and move the resulting
object if it did.
Thu Sep 29 12:36:51 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
* VMS does not permits `.' in directory names. Renamed
ld.bootstrap to ld-bootstrap, ld.cdtest to ld-cdtest, and
ld.scripts to ld-scripts.
Wed Sep 28 12:18:54 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
* config/default.exp: Set variables as and nm. Create tmpdir if
it does not already exist.
* ld.bootstrap/bootstrap.exp: Don't create tmpdir here.
* ld.cdtest/cdtest.exp: Likewise.
* ld.scripts/defined.exp: Likewise. Also, don't set as and nm
here. Change perror for no variables found to fail.
* ld.scripts/script.exp: New test.
* ld.scripts/script.t, ld.scripts/script.s: New files.
Tue Sep 27 14:59:51 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
* ld.scripts: New directory.
* ld.scripts/defined.exp, ld.scripts/defined.s: New files.
* ld.scripts/defined.t: New file.
* lib/ld.exp (default_ld_simple_link): New function.
(default_ld_assemble, default_ld_nm): New functions.
* config/default.exp: Rename from unix-ld.exp.
(ld_simple_link, ld_assemble, ld_nm): New functions.
* config/unix-ld.exp: Set ld using findfile.
* lib/ld.exp (default_ld_relocate): Return a value. Change format
of log messages.
(default_ld_compile): Likewise.
(default_ld_link): Likewise. Also, don't include $BFDLIB and
$LIBIBERTY in link.
* ld.bootstrap/bootstrap.exp: Rewrite.
* ld.cdtest/cdtest.exp: Rewrite.
* ld.cdtest/cdtest-foo.cc: Update from top level ld directory.
* ld.cdtest/cdtest-foo.h: Likewise.
* ld.cdtest/cdtest-main.cc: Likewise.
Fri May 27 09:35:04 1994 Ken Raeburn (raeburn@cygnus.com)
* ld.cdtest/cdtest.exp: Don't look for $result before it's
defined.
Tue May 17 15:06:49 1994 Bill Cox (bill@rtl.cygnus.com)
* ld.bootstrap/bootstrap.exp, lib/ld.exp: Replace error proc
calls with perror calls.
Wed May 11 16:47:46 1994 Ken Raeburn (raeburn@rtl.cygnus.com)
* ld.cdtest/cdtest-bar.cc: Renamed from cdtest-func.cc.
* ld.cdtest/cdtest.exp: Adjusted.
Fri Jan 28 13:25:41 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
* lib/ld.exp (simple_diff): Indicate failure if files have
different numbers of lines. Don't muck with $differences to avoid
indicating a pass, just return.
* testsuite/ld.cdtest/{cdtest-foo.h,cdtest-foo.cc,cdtest-main.cc}:
Fix test case to be valid ANSI C++. Don't require use of header
files, so "../gcc/xgcc -B../gcc/" can be used for CXX.
* testsuite/ld.cdtest/cdtest.exp: Combine "rm" lines. Add some
commentary on things that are still broken with this test case.
Fri Sep 10 09:58:23 1993 Jeffrey Wheat (cassidy@cygnus.com)
* testsuite/ld.cdtest/cdtest.exp: Added CXXFLAGS to compile stage.
Thu Aug 12 16:05:37 1993 Jeffrey Wheat (cassidy@cygnus.com)
* testsuite/lib/ld.exp: add compiler and linker support
* testsuite/config/unix-ld.exp: add compiler and linker support
* testsuite/ld.bootstrap/bootstrap.exp: fixed to do partial links
* testsuite/ld.cdtest/cdtest.exp: constructor/destructor testscase
Wed Aug 4 21:00:18 1993 Jeffrey Wheat (cassidy@cygnus.com)
* testsuite/lib/ld.exp: new file
* testsuite/config/unix-ld.exp: new file
* testsuite/ld.bootstrap/bootstrap.exp: new file

View File

@ -1,131 +0,0 @@
# Basic expect script for LD Regression Tests
# Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation
#
# This file 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.
#
# Written by Jeffrey Wheat (cassidy@cygnus.com)
#
if ![info exists ld] then {
set ld [findfile $base_dir/ld.new $base_dir/ld.new [transform ld]]
}
if ![info exists as] then {
set as [findfile $base_dir/../gas/as.new $base_dir/../gas/as.new [transform as]]
}
if ![info exists nm] then {
set nm [findfile $base_dir/../binutils/nm.new $base_dir/../binutils/nm.new [transform nm]]
}
if ![info exists objdump] then {
set objdump [findfile $base_dir/../binutils/objdump]
}
if ![info exists objcopy] then {
set objcopy [findfile $base_dir/../binutils/objcopy]
}
if ![info exists ar] then {
set ar [findfile $base_dir/../binutils/ar]
}
if ![info exists strip] then {
set strip [findfile $base_dir/../binutils/strip.new $base_dir/../binutils/strip.new [transform strip]]
}
if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
# load the utility procedures
load_lib ld.exp
#
# ld_version -- extract and print the version number of ld compiler (GCC)
#
proc ld_version {} {
global ld
default_ld_version $ld
}
#
# ld_exit -- just a stub for ld
#
proc ld_exit {} {
}
#
# ld_start
# relink the linker
#
proc ld_start { ld target } {
#
}
#
# ld_relocate
# link an object using relocation
#
proc ld_relocate { ld target objects } {
default_ld_relocate $ld $target $objects
}
#
# ld_link
# link a program using ld
#
proc ld_link { ld target objects } {
default_ld_link $ld $target $objects
}
#
# ld_simple_link
# link a program using ld, without including any libraries
#
proc ld_simple_link { ld target objects } {
default_ld_simple_link $ld $target $objects
}
#
# ld_compile
# compile an object using $cc
#
proc ld_compile { cc source object } {
default_ld_compile $cc $source $object
}
#
# ld_assemble
# assemble a file
#
proc ld_assemble { as source object } {
default_ld_assemble $as $source $object
}
#
# ld_nm
# run nm on a file
#
proc ld_nm { nm object } {
default_ld_nm $nm $object
}
#
# ld_exec
# execute ithe target
#
proc ld_exec { target output } {
default_ld_exec $target $output
}

View File

@ -1,96 +0,0 @@
# Expect script for LD Bootstrap Tests
# Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation
#
# This file 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.
#
# Written by Jeffrey Wheat (cassidy@cygnus.com)
# Rewritten by Ian Lance Taylor (ian@cygnus.com)
#
# Make sure that ld can bootstrap itself.
# This test can only be run if ld generates native executables.
if ![isnative] {
return
}
# Bootstrap ld. First link the object files together using -r, in
# order to test -r. Then link the result into an executable, ld1, to
# really test -r. Use ld1 to link a fresh ld, ld2. Use ld2 to link a
# new ld, ld3. ld2 and ld3 should be identical.
foreach flags {"" "--static" "--traditional-format" "--no-keep-memory"} {
if {"$flags" != ""} {
set testname "bootstrap with $flags"
} else {
set testname "bootstrap"
}
# This test can only be run if we have the ld build directory,
# since we need the object files.
if {$ld != "$objdir/ld.new"} {
untested $testname
continue
}
if ![ld_relocate $ld tmpdir/ld-partial.o "$flags $OFILES"] {
fail $testname
continue
}
# On AIX, you need to specify an import list when using --static.
# You only want the import list when creating the final
# executable.
if [istarget "*-*-aix*"] {
if {"$flags" == "--static"} {
set flags "--static -bI:/lib/syscalls.exp"
}
}
# On Irix 5, linking with --static only works if all the files are
# compiled using -non_shared.
if {"$flags" == "--static"} {
setup_xfail "mips*-*-irix5*"
}
if ![ld_link $ld tmpdir/ld1 "$flags tmpdir/ld-partial.o $BFDLIB $LIBIBERTY"] {
fail $testname
continue
}
if ![ld_link tmpdir/ld1 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY"] {
fail $testname
continue
}
if ![ld_link tmpdir/ld2 tmpdir/ld3 "$flags $OFILES $BFDLIB $LIBIBERTY"] {
fail $testname
continue
}
send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
verbose "cmp tmpdir/ld2 tmpdir/ld3"
catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
pass $testname
} else {
send_log "$exec_output\n"
verbose "$exec_output" 1
fail $testname
}
}

View File

@ -1,17 +0,0 @@
// test program for Class Foo
#include "cdtest-foo.h"
static Foo static_foo( "static_foo");
Foo f()
{
Foo x;
return x;
}
void g()
{
Foo other_foo1 = Foo( "other_foo1"), other_foo2 = Foo( "other_foo2");
other_foo2 = other_foo1;
}

View File

@ -1,89 +0,0 @@
// Class Foo
#pragma implementation
// We don't use header files, since we only want to see, whether the
// compiler is installed properly.
//
#if (__GNUG__ == 2)
typedef __SIZE_TYPE__ size_t;
#else
typedef unsigned int size_t;
#endif
extern "C" {
char *strncpy (char* dest, const char* dest, size_t len);
int printf (const char*, ...);
};
#include "cdtest-foo.h"
int Foo::foos = 0;
void Foo::init_foo ()
{
printf ("BROKENLY calling Foo::init_foo from __init_start; size_of(Foo) = %d\n", sizeof(Foo));
foos = FOOLISH_NUMBER;
}
Foo::Foo ()
{
i = ++foos;
strncpy (message, "default-foo", len);
#ifdef WITH_ADDR
printf ("Constructing Foo(%d) \"default-foo\" at %08x\n", i, this);
#else
printf ("Constructing Foo(%d) \"default-foo\"\n", i);
#endif
}
Foo::Foo (char* msg)
{
i = ++foos;
strncpy( message, msg, len);
#ifdef WITH_ADDR
printf ( "Constructing Foo(%d) \"%s\" at %08x\n", i, message, this);
#else
printf ( "Constructing Foo(%d) \"%s\"\n", i, message);
#endif
}
Foo::Foo (const Foo& foo)
{
i = ++foos;
#ifdef WITH_ADDR
printf ("Initializing Foo(%d) \"%s\" at %08x with Foo(%d) %08x\n",
i, foo.message, this, foo.i, &foo);
#else
printf ("Initializing Foo(%d) \"%s\" with Foo(%d)\n",i, foo.message, foo.i);
#endif
for ( int k = 0; k < FOO_MSG_LEN; k++) message[k] = foo.message[k];
}
Foo& Foo::operator= (const Foo& foo)
{
#ifdef WITH_ADDR
printf ("Copying Foo(%d) \"%s\" at %08x to Foo(%d) %08x\n",
foo.i, foo.message, &foo, i, this);
#else
printf ("Copying Foo(%d) \"%s\" to Foo(%d)\n", foo.i, foo.message, i);
#endif
for ( int k = 0; k < FOO_MSG_LEN; k++) message[k] = foo.message[k];
return *this;
}
Foo::~Foo ()
{
foos--;
#ifdef WITH_ADDR
printf ("Destructing Foo(%d) \"%s\" at %08x (remaining foos: %d)\n",
i, message, this, foos);
#else
printf ("Destructing Foo(%d) \"%s\" (remaining foos: %d)\n",
i, message, foos);
#endif
}

View File

@ -1,24 +0,0 @@
// Class Foo
#pragma interface
#define FOOLISH_NUMBER -4711
#ifndef FOO_MSG_LEN
#define FOO_MSG_LEN 80
#endif
class Foo {
static int foos;
int i;
const len = FOO_MSG_LEN;
char message[len];
public:
static void init_foo ();
static int nb_foos() { return foos; }
Foo();
Foo( char* message);
Foo(const Foo&);
Foo & operator= (const Foo&);
~Foo ();
};

View File

@ -1,40 +0,0 @@
// main program for Class Foo
extern "C" {
// Some <assert.h> implementations (e.g. SUNOS 4.1) are broken,
// in that they require <stdio.h>. But, if gcc/g++ is installed
// correctly, you should get gcc's assert.h.
// If the compile fails, it means the wrong include files are in use!
#include <assert.h>
};
#include "cdtest-foo.h"
extern "C" void __init_start();
extern Foo f(void);
extern void g(void);
/* This function should *not* be called by the environment. There is
no way in C++ to ``run something after the initializers but before main()''.
The library that depends on this (NIHCL) is broken. -- John Gilmore
We leave this here to test that future changes to the compiler
do not re-introduce this losing ``feature''. */
void
__init_start()
{
Foo::init_foo();
}
static Foo static_foo( "static_foo");
main()
{
assert (Foo::nb_foos() == 2);
Foo automatic_foo( "automatic_foo");
Foo bla_foo = f();
assert (Foo::nb_foos() == 4);
g();
assert (Foo::nb_foos() == 4);
// `automatic_foo' and `bla_foo' are destructed here
}

View File

@ -1,15 +0,0 @@
Constructing Foo(1) "static_foo"
Constructing Foo(2) "static_foo"
Constructing Foo(3) "automatic_foo"
Constructing Foo(4) "default-foo"
Initializing Foo(5) "default-foo" with Foo(4)
Destructing Foo(4) "default-foo" (remaining foos: 4)
Constructing Foo(5) "other_foo1"
Constructing Foo(6) "other_foo2"
Copying Foo(5) "other_foo1" to Foo(6)
Destructing Foo(6) "other_foo1" (remaining foos: 5)
Destructing Foo(5) "other_foo1" (remaining foos: 4)
Destructing Foo(5) "default-foo" (remaining foos: 3)
Destructing Foo(3) "automatic_foo" (remaining foos: 2)
Destructing Foo(2) "static_foo" (remaining foos: 1)
Destructing Foo(1) "static_foo" (remaining foos: 0)

View File

@ -1,100 +0,0 @@
# Expect script for LD cdtest Tests
# Copyright (C) 1993,1994,1995, 1997 Free Software Foundation
#
# This file 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.
#
# Written by Jeffrey Wheat (cassidy@cygnus.com)
# Rewritten by Ian Lance Taylor (ian@cygnus.com)
#
# Make sure that constructors are handled correctly.
set test1 "cdtest"
set test2 "cdtest with -Ur"
# This test requires running the executable generated by ld.
if ![isnative] {
return
}
if { [which $CXX] == 0 } {
untested $test1
untested $test2
return
}
if { ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/cdtest-foo.cc tmpdir/cdtest-foo.o]
|| ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/cdtest-bar.cc tmpdir/cdtest-bar.o]
|| ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/cdtest-main.cc tmpdir/cdtest-main.o] } {
unresolved $test1
unresolved $test2
return
}
if ![ld_link $ld tmpdir/cdtest {tmpdir/cdtest-foo.o tmpdir/cdtest-bar.o tmpdir/cdtest-main.o}] {
fail $test1
} else {
send_log "tmpdir/cdtest >tmpdir/cdtest.out\n"
verbose "tmpdir/cdtest >tmpdir/cdtest.out"
catch "exec tmpdir/cdtest >tmpdir/cdtest.out" exec_output
if ![string match "" $exec_output] then {
send_log "$exec_output\n"
verbose "$exec_output" 1
fail $test1
} else {
send_log "diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat\n"
verbose "diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat"
catch "exec diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
pass $test1
} else {
send_log "$exec_output\n"
verbose "$exec_output" 1
fail $test1
}
}
}
if ![ld_relocate $ld tmpdir/cdtest.o {-Ur tmpdir/cdtest-foo.o tmpdir/cdtest-bar.o tmpdir/cdtest-main.o}] {
fail $test2
} else {
if ![ld_link $ld tmpdir/cdtest tmpdir/cdtest.o] {
fail $test2
} else {
send_log "tmpdir/cdtest >tmpdir/cdtest.out\n"
verbose "tmpdir/cdtest >tmpdir/cdtest.out"
catch "exec tmpdir/cdtest >tmpdir/cdtest.out" exec_output
if ![string match "" $exec_output] then {
send_log "$exec_output\n"
verbose "$exec_output" 1
fail $test2
} else {
send_log "diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat\n"
verbose "diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat"
catch "exec diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
pass $test2
} else {
send_log "$exec_output\n"
verbose "$exec_output" 1
fail $test2
}
}
}
}

View File

@ -1,786 +0,0 @@
# Expect script for ld-version tests
# Copyright (C) 1997 Free Software Foundation
#
# This file 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.
#
# Written by Eric Youngdale (eric@andante.jic.com)
#
# This test can only be run if ld generates native executables.
if ![isnative] then {return}
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
# This is similar to the test that is used in ld-shared, BTW.
if { ![istarget i386-*-sysv4*] \
&& ![istarget i486-*-sysv4*] \
&& ![istarget i586-*-sysv4*] \
&& ![istarget i386-*-unixware] \
&& ![istarget i486-*-unixware] \
&& ![istarget i586-*-unixware] \
&& ![istarget i386-*-elf*] \
&& ![istarget i486-*-elf*] \
&& ![istarget i586-*-elf*] \
&& ![istarget i386-*-linux*] \
&& ![istarget i486-*-linux*] \
&& ![istarget i586-*-linux*] \
&& ![istarget m68k-*-linux*] \
&& ![istarget mips*-*-irix5*] \
&& ![istarget sparc*-*-elf] \
&& ![istarget sparc*-*-solaris2*] } {
return
}
if { [istarget i386-*-linuxaout*] \
|| [istarget i486-*-linuxaout*] \
|| [istarget i586-*-linuxaout*] \
|| [istarget i386-*-linuxoldld*] \
|| [istarget i486-*-linuxoldld*] \
|| [istarget i586-*-linuxoldld*] \
|| [istarget m68k-*-linuxaout*] } {
return
}
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
return
}
set diff diff
set tmpdir tmpdir
set VOBJDUMP_FLAGS --private-headers
set DOBJDUMP_FLAGS --dynamic-syms
set SOBJDUMP_FLAGS --syms
set shared --shared
set script --version-script
proc test_ar { test lib object expect } {
global ar
global nm
global tmpdir
global srcdir
global subdir
global diff
verbose -log "$ar -cr $tmpdir/$lib $tmpdir/$object"
catch "exec $ar -cr $tmpdir/$lib $tmpdir/$object" exec_output
set exec_output [prune_warnings $exec_output]
if ![string match "" $exec_output] {
verbose -log "$exec_output"
unresolved "$test"
return
}
verbose -log "$nm --print-armap $tmpdir/$lib | grep \" in \" | grep \"VERS\\|bar\\|foo\" | sort > $tmpdir/nm.out"
catch "exec $nm --print-armap $tmpdir/$lib | grep \\\ in\\\ | grep VERS\\\\|bar\\\\|foo | sort > $tmpdir/nm.out" exec_output
if [string match "" $exec_output] then {
catch "exec $diff -q $tmpdir/nm.out $srcdir/$subdir/$expect" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
pass $test
return
} else {
verbose -log "$exec_output"
fail "$test"
return
}
} else {
verbose -log "$exec_output"
fail "$test"
}
}
#
# objdump_emptysymstuff
# Check non-dynamic symbols and make sure there are none with '@'.
#
proc objdump_emptysymstuff { objdump object } {
global SOBJDUMP_FLAGS
global version_output
global diff
if ![info exists SOBJDUMP_FLAGS] { set SOBJDUMP_FLAGS "" }
verbose -log "$objdump $SOBJDUMP_FLAGS $object | sed -n /\@/p"
catch "exec $objdump $SOBJDUMP_FLAGS $object | sed -n /\@/p" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
# We shouldn't get anything here.
return 1
} else {
# it is not normal to come here - we have no output to compare.
verbose -log "$exec_output"
verbose -log "objdump_emptysymstuff: did not expect any output from objdump"
return 0
}
}
#
# objdump_emptydynsymstuff
# Check dynamic symbols and make sure there are none with '@'.
#
proc objdump_emptydynsymstuff { objdump object } {
global DOBJDUMP_FLAGS
global version_output
global diff
if ![info exists VOBJDUMP_FLAGS] { set VOBJDUMP_FLAGS "" }
verbose -log "$objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p"
catch "exec $objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
# We shouldn't get anything here.
return 1
} else { if [string match "*objdump: *: not a dynamic object" $exec_output] then {
return 1
} else {
# it is not normal to come here - we have no output to compare.
verbose -log "$exec_output"
verbose -log "objdump_emptydynsymstuff: did not expect any output from objdump"
return 0
} }
}
#
# objdump_emptyverstuff
# Make sure there is no version information
#
proc objdump_emptyverstuff { objdump object } {
global VOBJDUMP_FLAGS
global version_output
global diff
global tmpdir
if {[which $objdump] == 0} then {
perror "$objdump does not exist"
return 0
}
if ![info exists VOBJDUMP_FLAGS] { set VOBJDUMP_FLAGS "" }
verbose -log "$objdump $VOBJDUMP_FLAGS $object | sed -n /Version/,\\\$p > $tmpdir/objdump.out"
catch "exec $objdump $VOBJDUMP_FLAGS $object | sed -n /Version/,\\\$p" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
# it is normal to fail here - we have no output to compare.
return 1
} else {
verbose -log "$exec_output"
verbose -log "objdump_emptyverstuff: did not expect any output from objdump"
return 0
}
}
#
# objdump_symstuff
# Dump non-dynamic symbol stuff and make sure that it is sane.
#
proc objdump_symstuff { objdump object expectfile } {
global SOBJDUMP_FLAGS
global version_output
global diff
global tmpdir
if ![info exists SOBJDUMP_FLAGS] { set SOBJDUMP_FLAGS "" }
verbose -log "$objdump $SOBJDUMP_FLAGS $object | grep \@ | sort > $tmpdir/objdump.out"
catch "exec $objdump $SOBJDUMP_FLAGS $object | grep \@ | sort > $tmpdir/objdump.out" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
# Now do a line-by-line comparison to effectively diff the darned things
# The stuff coming from the expectfile is actually a regex, so we can
# skip over the actual addresses and so forth. This is currently very
# simpleminded - it expects a one-to-one correspondence in terms of line
# numbers.
if [file exists $expectfile] then {
set file_a [open $expectfile r]
} else {
perror "$expectfile doesn't exist"
return 0
}
if [file exists $tmpdir/objdump.out] then {
set file_b [open $tmpdir/objdump.out r]
} else {
perror "$tmpdir/objdump.out doesn't exist"
return 0
}
verbose "# Diff'ing: $expectfile $tmpdir/objdump.out" 2
set eof -1
set differences 0
while { [gets $file_a line] != $eof } {
if [regexp "^#.*$" $line] then {
continue
} else {
lappend list_a $line
}
}
close $file_a
while { [gets $file_b line] != $eof } {
if [regexp "^#.*$" $line] then {
continue
} else {
lappend list_b $line
}
}
close $file_b
for { set i 0 } { $i < [llength $list_a] } { incr i } {
set line_a [lindex $list_a $i]
set line_b [lindex $list_b $i]
verbose "\t$expectfile: $i: $line_a" 3
verbose "\t/tmp/objdump.out: $i: $line_b" 3
if [regexp $line_a $line_b] then {
continue
} else {
verbose -log "\t$expectfile: $i: $line_a"
verbose -log "\t$tmpdir/objdump.out: $i: $line_b"
return 0
}
}
if { [llength $list_a] != [llength $list_b] } {
verbose -log "Line count"
return 0
}
if $differences<1 then {
return 1
}
return 0
} else {
verbose -log "$exec_output"
return 0
}
}
#
# objdump_dymsymstuff
# Dump dynamic symbol stuff and make sure that it is sane.
#
proc objdump_dynsymstuff { objdump object expectfile } {
global DOBJDUMP_FLAGS
global version_output
global diff
global tmpdir
if ![info exists DOBJDUMP_FLAGS] { set DOBJDUMP_FLAGS "" }
verbose -log "$objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p | sort | uniq > $tmpdir/objdump.out"
catch "exec $objdump $DOBJDUMP_FLAGS $object | sed -n /VERS/p\\\;/show/p | sort | uniq > $tmpdir/objdump.out" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
# Now do a line-by-line comparison to effectively diff the darned things
# The stuff coming from the expectfile is actually a regex, so we can
# skip over the actual addresses and so forth. This is currently very
# simpleminded - it expects a one-to-one correspondence in terms of line
# numbers.
if [file exists $expectfile] then {
set file_a [open $expectfile r]
} else {
warning "$expectfile doesn't exist"
return 0
}
if [file exists $tmpdir/objdump.out] then {
set file_b [open $tmpdir/objdump.out r]
} else {
fail "$tmpdir/objdump.out doesn't exist"
return 0
}
verbose "# Diff'ing: $expectfile $tmpdir/objdump.out" 2
set eof -1
set differences 0
while { [gets $file_a line] != $eof } {
if [regexp "^#.*$" $line] then {
continue
} else {
lappend list_a $line
}
}
close $file_a
while { [gets $file_b line] != $eof } {
if [regexp "^#.*$" $line] then {
continue
} else {
lappend list_b $line
}
}
close $file_b
for { set i 0 } { $i < [llength $list_b] } { incr i } {
set line_b [lindex $list_b $i]
# The tests are rigged so that we should never export a symbol with the
# word 'hide' in it. Thus we just search for it, and bail if we find it.
if [regexp "hide" $line_b] then {
verbose -log "\t$tmpdir/objdump.out: $i: $line_b"
return 0
}
verbose "\t$expectfile: $i: $line_b" 3
# We can't assume that the sort is consistent across
# systems, so we must check each regexp. When we find a
# regexp, we null it out, so we don't match it twice.
for { set j 0 } { $j < [llength $list_a] } { incr j } {
set line_a [lindex $list_a $j]
if [regexp $line_a $line_b] then {
lreplace $list_a $j $j "CAN NOT MATCH"
break
}
}
if { $j >= [llength $list_a] } {
verbose -log "\t$tmpdir/objdump.out: $i: $line_b"
return 0
}
}
if { [llength $list_a] != [llength $list_b] } {
verbose -log "Line count"
return 0
}
if $differences<1 then {
return 1
}
return 0
} else {
verbose -log "$exec_output"
return 0
}
}
#
# objdump_versionstuff
# Dump version definitions/references and make sure that it is sane.
#
proc objdump_versionstuff { objdump object expectfile } {
global VOBJDUMP_FLAGS
global version_output
global diff
global tmpdir
if {[which $objdump] == 0} then {
perror "$objdump does not exist"
return 0
}
if ![info exists VOBJDUMP_FLAGS] { set VOBJDUMP_FLAGS "" }
verbose -log "$objdump $VOBJDUMP_FLAGS $object | sed -n /Version/,\\\$p > $tmpdir/objdump.out"
catch "exec $objdump $VOBJDUMP_FLAGS $object | sed -n /Version/,\\\$p > $tmpdir/objdump.out" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
# now perform differences against the expected output.
verbose -log "$diff -q $tmpdir/objdump.out $expectfile"
catch "exec $diff -q $tmpdir/objdump.out $expectfile" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
return 1
} else {
verbose -log "$exec_output"
return 0
}
return 1
} else {
verbose -log "$exec_output"
return 0
}
}
proc build_vers_lib { test source libname other mapfile verexp versymexp symexp } {
global ld
global srcdir
global subdir
global exec_output
global host_triplet
global tmpdir
global as
global objdump
global CC
global CFLAGS
global shared
global script
if ![ld_compile "$CC -S $CFLAGS" $srcdir/$subdir/$source $tmpdir/$libname.s] {
unresolved "$test"
return
}
if ![ld_assemble $as $tmpdir/$libname.s $tmpdir/$libname.o ] {
unresolved "$test"
return
}
if [string match "" $other] then {
set other_lib ""
} else {
set other_lib $tmpdir/$other
}
if [string match "" $mapfile] then {
set script_arg ""
} else {
set script_arg "$script $srcdir/$subdir/$mapfile"
}
if {![ld_simple_link $ld $tmpdir/$libname.so "$shared $tmpdir/$libname.o $other_lib $script_arg"]} {
fail "$test"
return
}
if {![objdump_versionstuff $objdump $tmpdir/$libname.so $srcdir/$subdir/$verexp ]} {
fail "$test"
return
}
if {![objdump_dynsymstuff $objdump $tmpdir/$libname.so $srcdir/$subdir/$versymexp ]} {
fail "$test"
return
}
if [string match "" $symexp] then {
if {![objdump_emptysymstuff $objdump $tmpdir/$libname.o ]} {
fail "$test"
return
}
} else {
if {![objdump_symstuff $objdump $tmpdir/$libname.o $srcdir/$subdir/$symexp ]} {
fail "$test"
return
}
}
pass $test
}
proc test_ldfail { test flag source execname other mapfile whyfail } {
global ld
global srcdir
global subdir
global exec_output
global host_triplet
global tmpdir
global as
global objdump
global CC
global CFLAGS
global script
if [string match "" $other] then {
set other_lib ""
} else {
set other_lib $tmpdir/$other
}
if ![ld_compile "$CC -S $flag $CFLAGS" $srcdir/$subdir/$source $tmpdir/$execname.s] {
unresolved "$test"
return
}
if ![ld_assemble $as $tmpdir/$execname.s $tmpdir/$execname.o ] {
unresolved "$test"
return
}
verbose -log "This link should fail because of $whyfail"
if [string match "" $mapfile] then {
set script_arg ""
} else {
set script_arg "$script $srcdir/$subdir/$mapfile"
}
if {![ld_link $ld $tmpdir/$execname "$tmpdir/$execname.o $other_lib $script_arg"]} {
pass "$test"
return
}
fail "$test"
}
proc test_asfail { test flag source execname whyfail } {
global srcdir
global subdir
global tmpdir
global as
global CC
global CFLAGS
if ![ld_compile "$CC -S $flag $CFLAGS" $srcdir/$subdir/$source $tmpdir/$execname.s] {
unresolved "$test"
return
}
verbose -log "This assemble should fail because of $whyfail"
catch "exec $as -o $tmpdir/$execname.o $tmpdir/$execname.s" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
fail "$test"
return
}
verbose -log "$exec_output"
pass "$test"
}
proc test_strip_vers_lib { test srclib libname verexp versymexp } {
global strip
global srcdir
global subdir
global exec_output
global host_triplet
global tmpdir
global objdump
verbose -log "cp $tmpdir/$srclib $tmpdir/$libname.so"
exec cp $tmpdir/$srclib $tmpdir/$libname.so
verbose -log "$strip $tmpdir/$libname.so"
catch "exec $strip $tmpdir/$libname.so" exec_output
if [string match "" $exec_output] then {
# If strip went OK, then run the usual tests on the thing to make sure that
# it is sane.
if {![objdump_versionstuff $objdump $tmpdir/$libname.so $srcdir/$subdir/$verexp ]} {
fail "$test"
return
}
if {![objdump_dynsymstuff $objdump $tmpdir/$libname.so $srcdir/$subdir/$versymexp ]} {
fail "$test"
return
}
} else {
verbose -log "$exec_output"
fail "$test"
return
}
pass $test
}
proc build_exec { test source execname flags solibname verexp versymexp symexp } {
global ld
global srcdir
global subdir
global exec_output
global host_triplet
global tmpdir
global as
global objdump
global CC
global CFLAGS
set shared --shared
set script --version-script
if ![ld_compile "$CC -S $CFLAGS" $srcdir/$subdir/$source $tmpdir/$execname.s] {
unresolved "$test"
return
}
if ![ld_assemble $as $tmpdir/$execname.s $tmpdir/$execname.o ] {
unresolved "$test"
return
}
if [string match "" $solibname] then {
set solibname_lib ""
} else {
set solibname_lib $tmpdir/$solibname
}
if {![ld_link $ld $tmpdir/$execname "$flags $tmpdir/$execname.o $solibname_lib"]} {
fail "$test"
return
}
if [string match "" $verexp] then {
#
# Make sure we get nothing back.
#
if {![objdump_emptyverstuff $objdump $tmpdir/$execname ]} {
fail "$test"
return
}
} else {
if {![objdump_versionstuff $objdump $tmpdir/$execname $srcdir/$subdir/$verexp ]} {
fail "$test"
return
}
}
if [string match "" $versymexp] then {
if {![objdump_emptydynsymstuff $objdump $tmpdir/$execname ]} {
fail "$test"
return
}
} else {
if {![objdump_dynsymstuff $objdump $tmpdir/$execname $srcdir/$subdir/$versymexp ]} {
fail "$test"
return
}
}
if [string match "" $symexp] then {
if {![objdump_emptysymstuff $objdump $tmpdir/$execname.o ]} {
fail "$test"
return
}
} else {
if {![objdump_symstuff $objdump $tmpdir/$execname.o $srcdir/$subdir/$symexp ]} {
fail "$test"
return
}
}
pass $test
}
#
# Basic test - build a library with versioned symbols.
#
build_vers_lib "vers1" vers1.c vers1 "" vers1.map vers1.ver vers1.dsym vers1.sym
#
# Test #2 - build a library, and link it against the library we built in step
# 1.
#
build_vers_lib "vers2" vers2.c vers2 vers1.so vers2.map vers2.ver vers2.dsym ""
#
# Test #3 - build an executable, and link it against vers1.so.
#
build_exec "vers3" vers3.c vers3 "" vers1.so vers3.ver vers3.dsym ""
#
# Test #4 - Make sure a version implicitly defined in an executable
# causes a version node to be created. Verify this both with and without
# --export-dynamic.
#
# This test fails on MIPS. On the MIPS we must put foo in the dynamic
# symbol table, which the test does not expect.
setup_xfail "mips*-*-*"
build_exec "vers4" vers4.c vers4 "" "" "" "" vers4.sym
build_exec "vers4a" vers4.c vers4a "-export-dynamic" "" vers4a.ver vers4a.dsym vers4a.sym
#
# Try multiple definitions foo@BAR and foo@@BAR and make sure the linker
# complains.
#
test_ldfail "vers5" "" vers5.c vers5 "" "" "multiple definition of foo@VERS_1.2"
#
#
# Now build a test that should reference a bunch of versioned symbols.
# All of them should be correctly referenced.
#
build_exec "vers6" vers6.c vers6 "" vers1.so vers6.ver vers6.dsym vers6.sym
#
# Another test to verify that something made local via 'local' is truly not
# accessible.
#
build_vers_lib "vers7a" vers7a.c vers7a "" vers7.map vers7a.ver vers7a.dsym vers7a.sym
test_ldfail "vers7" "" vers7.c vers7 vers7a.so "" "undefined reference to hide_a"
#
# This test is designed to verify that we can pass a linker script on the
# command line as if it were a normal .o file.
#
catch "exec cp $srcdir/$subdir/vers8.map $tmpdir/" ignore_output
build_vers_lib "vers8" vers1.c vers8 vers8.map "" vers8.ver vers1.dsym vers1.sym
#
# This test tries to make sure that version references to versioned symbols
# don't collide with default definitions with the same symbol.
#
build_exec "vers9" vers9.c vers9 "-export-dynamic" "" vers9.ver vers9.dsym vers9.sym
#
# Try and use a non-existant version node. The linker should fail with
# an error message.
#
test_ldfail "vers10" "-DDO_TEST10" vers1.c vers10 "" "vers1.map --shared" "invalid version"
#
# Try and some things the assembler should complain about.
#
test_asfail "vers11" "-DDO_TEST11" vers1.c vers11 "no @ in symver"
test_asfail "vers12" "-DDO_TEST12" vers1.c vers12 "extern version definition"
#
# Put a shared library in an archive library, and make sure the global
# archive symbol table is sane.
#
test_ar "ar with versioned solib" vers13.a vers1.so vers13.asym
#
# Strip a shared library, and make sure we didn't screw something up in there.
#
test_strip_vers_lib "vers14" vers1.so vers14 vers1.ver vers1.dsym
#
# Build another test with some versioned symbols. Here we are going to
# try and override something from the library, and we shouldn't get
# any errors.
#
build_exec "vers15" vers15.c vers15 "" vers1.so vers15.ver vers15.dsym vers15.sym

View File

@ -1,90 +0,0 @@
/*
* Basic test of versioning. The idea with this is that we define
* a bunch of definitions of the same symbol, and we can theoretically
* then link applications against varying sets of these.
*/
const char * show_bar1 = "asdf";
const char * show_bar2 = "asdf";
int bar()
{
return 3;
}
/*
* The 'hide' prefix is something so that we can automatically search the
* symbol table and verify that none of these symbols were actually exported.
*/
hide_original_foo()
{
return 1+bar();
}
hide_old_foo()
{
return 10+bar();
}
hide_old_foo1()
{
return 100+bar();
}
hide_new_foo()
{
return 1000+bar();
}
__asm__(".symver hide_original_foo,show_foo@");
__asm__(".symver hide_old_foo,show_foo@VERS_1.1");
__asm__(".symver hide_old_foo1,show_foo@VERS_1.2");
__asm__(".symver hide_new_foo,show_foo@@VERS_2.0");
#ifdef DO_TEST10
/* In test 10, we try and define a non-existant version node. The linker
* should catch this and complain. */
hide_new_bogus_foo()
{
return 1000+bar();
}
__asm__(".symver hide_new_bogus_foo,show_foo@VERS_2.2");
#endif
#ifdef DO_TEST11
/*
* This test is designed to catch a couple of syntactic errors. The assembler
* should complain about both of the directives below.
*/
xyzzz()
{
new2_foo();
bar33();
}
__asm__(".symver new2_foo,fooVERS_2.0");
__asm__(".symver bar33,bar@@VERS_2.0");
#endif
#ifdef DO_TEST12
/*
* This test is designed to catch a couple of syntactic errors. The assembler
* should complain about both of the directives below.
*/
xyzzz()
{
new2_foo();
bar33();
}
__asm__(".symver bar33,bar@@VERS_2.0");
#endif

View File

@ -1,9 +0,0 @@
[0]* g DO \*ABS\* [0]* VERS_1.1 VERS_1.1
[0]* g DO \*ABS\* [0]* VERS_1.2 VERS_1.2
[0]* g DO \*ABS\* [0]* VERS_2.0 VERS_2.0
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* \(Base\) show_foo
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* \(VERS_1.1\) show_foo
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* \(VERS_1.2\) show_foo
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_2.0 show_foo
[0-9a-f]* g DO (.data|\*ABS\*) [0-9a-f]* VERS_2.0 show_bar1
[0-9a-f]* g DO (.data|\*ABS\*) [0-9a-f]* VERS_2.0 show_bar2

View File

@ -1,16 +0,0 @@
VERS_1.1 {
global:
foo1;
local:
hide_old*;
hide_original*;
hide_new*;
};
VERS_1.2 {
foo2;
} VERS_1.1;
VERS_2.0 {
show_bar1; show_bar2;
} VERS_1.2;

View File

@ -1,4 +0,0 @@
[0-9a-f]* g F .text [0-9a-f]* show_foo@
[0-9a-f]* g F .text [0-9a-f]* show_foo@VERS_1.1
[0-9a-f]* g F .text [0-9a-f]* show_foo@VERS_1.2
[0-9a-f]* g F .text [0-9a-f]* show_foo@@VERS_2.0

View File

@ -1,8 +0,0 @@
Version definitions:
1 0x01 0x0a26881f tmpdir/vers1.so
2 0x00 0x0a7927b1 VERS_1.1
3 0x00 0x0a7927b2 VERS_1.2
VERS_1.1
4 0x00 0x0a7922b0 VERS_2.0
VERS_1.2

View File

@ -1,10 +0,0 @@
VERS_1.1 in vers1.so
VERS_1.2 in vers1.so
VERS_2.0 in vers1.so
bar in vers1.so
show_bar1 in vers1.so
show_bar2 in vers1.so
show_foo@ in vers1.so
show_foo@@VERS_2.0 in vers1.so
show_foo@VERS_1.1 in vers1.so
show_foo@VERS_1.2 in vers1.so

View File

@ -1,31 +0,0 @@
/*
* Testcase to make sure that if we externally reference a versioned symbol
* that we always get the right one.
*/
foo_1()
{
return 1034;
}
foo_2()
{
return 1343;
}
foo_3()
{
return 1334;
}
main()
{
printf("Expect 4, get %d\n", foo_1());
printf("Expect 13, get %d\n", foo_2());
printf("Expect 103, get %d\n", foo_3());
}
__asm__(".symver foo_1,show_foo@");
__asm__(".symver foo_2,show_foo@VERS_1.1");
__asm__(".symver foo_3,show_foo@@VERS_1.2");

View File

@ -1,5 +0,0 @@
[0]* g DO \*ABS\* [0]* VERS_1.1 VERS_1.1
[0]* g DO \*ABS\* [0]* VERS_1.2 VERS_1.2
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* \(Base\) show_foo
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* \(VERS_1.1\) show_foo
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_1.2 show_foo

View File

@ -1,3 +0,0 @@
[0-9a-f]* g F .text [0-9a-f]* show_foo@
[0-9a-f]* g F .text [0-9a-f]* show_foo@VERS_1.1
[0-9a-f]* g F .text [0-9a-f]* show_foo@@VERS_1.2

View File

@ -1,5 +0,0 @@
Version definitions:
1 0x01 0x0d8a2605 tmpdir/vers15
2 0x00 0x0a7927b2 VERS_1.2
3 0x00 0x0a7927b1 VERS_1.1

View File

@ -1,9 +0,0 @@
/*
* Test function. This is built into a shared library, and references a
* versioned symbol foo that is in test.so.
*/
show_xyzzy()
{
printf("%d", show_foo());
}

View File

@ -1,3 +0,0 @@
[0-9a-f]* DF \*UND\* [0-9a-f]* VERS_2.0 show_foo
[0]* g DO \*ABS\* [0]* VERS_XXX_1.1 VERS_XXX_1.1
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_XXX_1.1 show_xyzzy

View File

@ -1,4 +0,0 @@
VERS_XXX_1.1 {
show_xyzzy;
};

View File

@ -1,8 +0,0 @@
Version definitions:
1 0x01 0x0a26181f tmpdir/vers2.so
2 0x00 0x08785b51 VERS_XXX_1.1
Version References:
required from tmpdir/vers1.so:
0x0a7922b0 0x00 03 VERS_2.0

View File

@ -1,9 +0,0 @@
/*
* Main program for test1, test2.
*/
main()
{
printf("%d\n", show_foo());
}

View File

@ -1 +0,0 @@
[0-9a-f]* DF \*UND\* [0-9a-f]* VERS_2.0 show_foo

View File

@ -1,4 +0,0 @@
Version References:
required from tmpdir/vers1.so:
0x0a7922b0 0x00 02 VERS_2.0

View File

@ -1,23 +0,0 @@
/*
* Testcase to make sure that a versioned symbol definition in an
* application correctly defines the version node, if and only if
* the actual symbol is exported. This is built both with and without
* -export-dynamic.
*/
int bar()
{
return 3;
}
new_foo()
{
return 1000+bar();
}
__asm__(".symver new_foo,foo@@VERS_2.0");
main()
{
printf("%d\n", foo());
}

View File

@ -1 +0,0 @@
[0-9a-f]* g F .text [0-9a-f]* foo@@VERS_2.0

View File

@ -1,2 +0,0 @@
[0]* g DO \*ABS\* [0]* VERS_2.0 VERS_2.0
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_2.0 foo

View File

@ -1 +0,0 @@
[0-9a-f]* g F .text [0-9a-f]* foo@@VERS_2.0

View File

@ -1,4 +0,0 @@
Version definitions:
1 0x01 0x0d8a26e1 tmpdir/vers4a
2 0x00 0x0a7922b0 VERS_2.0

View File

@ -1,46 +0,0 @@
/*
* Testcase to verify that foo@BAR and foo@@BAR are correctly detected
* as a multiply defined symbol.
*/
const char * bar1 = "asdf";
const char * bar2 = "asdf";
int bar()
{
return 3;
}
original_foo()
{
return 1+bar();
}
old_foo()
{
return 10+bar();
}
old_foo1()
{
return 100+bar();
}
new_foo()
{
return 1000+bar();
}
__asm__(".symver original_foo,foo@");
__asm__(".symver old_foo,foo@VERS_1.1");
__asm__(".symver old_foo1,foo@VERS_1.2");
__asm__(".symver new_foo,foo@@VERS_1.2");
int
main ()
{
return 0;
}

View File

@ -1,17 +0,0 @@
/*
* Testcase to make sure that if we externally reference a versioned symbol
* that we always get the right one.
*/
main()
{
printf("Expect 4, get %d\n", foo_1());
printf("Expect 13, get %d\n", foo_2());
printf("Expect 103, get %d\n", foo_3());
printf("Expect 1003, get %d\n", foo_4());
}
__asm__(".symver foo_1,show_foo@");
__asm__(".symver foo_2,show_foo@VERS_1.1");
__asm__(".symver foo_3,show_foo@VERS_1.2");
__asm__(".symver foo_4,show_foo@VERS_2.0");

View File

@ -1,4 +0,0 @@
[0-9a-f]* DF \*UND\* [0-9a-f]* show_foo
[0-9a-f]* DF \*UND\* [0-9a-f]* VERS_2.0 show_foo
[0-9a-f]* DF \*UND\* [0-9a-f]* VERS_1.2 show_foo
[0-9a-f]* DF \*UND\* [0-9a-f]* VERS_1.1 show_foo

View File

@ -1,4 +0,0 @@
[0]* *F? *\*UND\* [0]* show_foo@
[0]* *F? *\*UND\* [0]* show_foo@VERS_1.1
[0]* *F? *\*UND\* [0]* show_foo@VERS_1.2
[0]* *F? *\*UND\* [0]* show_foo@VERS_2.0

View File

@ -1,8 +0,0 @@
Version References:
required from tmpdir/vers1.so:
0x0a7927b1 0x00 04 VERS_1.1
required from tmpdir/vers1.so:
0x0a7927b2 0x00 03 VERS_1.2
required from tmpdir/vers1.so:
0x0a7922b0 0x00 02 VERS_2.0

View File

@ -1,10 +0,0 @@
/*
* Test program that goes with test7.so
*/
int
main()
{
return hide_a(1) + show_b(1);
}

View File

@ -1,6 +0,0 @@
VERS_1 {
global:
show_b ;
local:
hide_a;
};

View File

@ -1,18 +0,0 @@
/*
* Test supplied by Ulrich. Verify that we can correctly force 'a'
* to local scope.
*/
int
__a_internal (int e)
{
return e + 10;
}
int
__b_internal (int e)
{
return e + 42;
}
asm (".symver __a_internal,hide_a@@VERS_1");
asm (".symver __b_internal,show_b@@VERS_1");

View File

@ -1,2 +0,0 @@
[0]* g DO \*ABS\* [0]* VERS_1 VERS_1
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_1 show_b

View File

@ -1,2 +0,0 @@
[0-9a-f]* g F .text [0-9a-f]* hide_a@@VERS_1
[0-9a-f]* g F .text [0-9a-f]* show_b@@VERS_1

View File

@ -1,4 +0,0 @@
Version definitions:
1 0x01 0x0269fd3f tmpdir/vers7a.so
2 0x00 0x05aa7921 VERS_1

View File

@ -1,5 +0,0 @@
int
main()
{
return a(1) + b(1);
}

View File

@ -1,18 +0,0 @@
VERSION {
VERS_1.1 {
global:
foo1;
local:
hide_old*;
hide_original*;
hide_new*;
};
VERS_1.2 {
foo2;
} VERS_1.1;
VERS_2.0 {
show_bar1; show_bar2;
} VERS_1.2;
}

View File

@ -1,8 +0,0 @@
Version definitions:
1 0x01 0x0a26f81f tmpdir/vers8.so
2 0x00 0x0a7927b1 VERS_1.1
3 0x00 0x0a7927b2 VERS_1.2
VERS_1.1
4 0x00 0x0a7922b0 VERS_2.0
VERS_1.2

View File

@ -1,39 +0,0 @@
/*
* Testcase to verify that reference to foo@BAR and a definition of foo@@BAR
* are not treated as a multiple def.
*/
const char * bar1 = "asdf";
const char * bar2 = "asdf";
int bar()
{
return 3;
}
original_foo()
{
return 1+bar();
}
old_foo()
{
return 10+bar();
}
new_foo()
{
return 1000+bar();
}
main()
{
old_foo1();
}
__asm__(".symver original_foo,foo@");
__asm__(".symver old_foo,foo@VERS_1.1");
__asm__(".symver old_foo1,foo@VERS_1.2");
__asm__(".symver new_foo,foo@@VERS_1.2");

View File

@ -1,4 +0,0 @@
[0]* g DO \*ABS\* [0]* VERS_1.1 VERS_1.1
[0]* g DO \*ABS\* [0]* VERS_1.2 VERS_1.2
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* \(VERS_1.1\) foo
[0-9a-f]* g DF (.text|\*ABS\*) [0-9a-f]* VERS_1.2 foo

View File

@ -1,4 +0,0 @@
[0]* *F? *\*UND\* [0]* foo@VERS_1.2
[0-9a-f]* g F .text [0-9a-f]* foo@
[0-9a-f]* g F .text [0-9a-f]* foo@VERS_1.1
[0-9a-f]* g F .text [0-9a-f]* foo@@VERS_1.2

View File

@ -1,5 +0,0 @@
Version definitions:
1 0x01 0x04d8a269 tmpdir/vers9
2 0x00 0x0a7927b1 VERS_1.1
3 0x00 0x0a7927b2 VERS_1.2

View File

@ -1,263 +0,0 @@
# Expect script for ld-empic tests
# Copyright (C) 1994,1995, 1996, 1997 Free Software Foundation
#
# This file 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.
#
# Written by Ian Lance Taylor (ian@cygnus.com)
#
# Test the handling of MIPS embedded PIC code. This test essentially
# tests the compiler and assembler as well as the linker, since MIPS
# embedded PIC is a GNU enhancement to standard MIPS tools.
# Embedded PIC is only supported for MIPS ECOFF targets.
if ![istarget mips*-*-ecoff*] {
return
}
set testname relax
if { [which $CC] == 0 } {
untested $testname
return
}
# Test that relaxation works correctly. This testsuite was composed
# (by experimentation) to force the linker to relax twice--that is,
# the first relaxation pass will force another call to be out of
# range, requiring a second relaxation pass.
if { ![ld_compile "$CC $CFLAGS -membedded-pic" $srcdir/$subdir/relax1.c tmpdir/relax1.o]
|| ![ld_compile "$CC $CFLAGS -membedded-pic" $srcdir/$subdir/relax2.c tmpdir/relax2.o]
|| ![ld_compile "$CC $CFLAGS -membedded-pic" $srcdir/$subdir/relax3.c tmpdir/relax3.o]
|| ![ld_compile "$CC $CFLAGS -membedded-pic" $srcdir/$subdir/relax4.c tmpdir/relax4.o] } {
unresolved $testname
return
}
if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir/$subdir/relax.t tmpdir/relax1.o tmpdir/relax2.o tmpdir/relax3.o tmpdir/relax4.o"] {
fail $testname
} else {
# Check that the relaxation produced the correct result. Check
# each bal instruction. Some will go directly to the start of a
# function, which is OK. Some will form part of the five
# instruction expanded call sequence, in which case we compute the
# real destination and make sure it is the start of a function.
# Some bal instructions are used to locate the start of the
# function in order to do position independent addressing into the
# text section, in which case we just check that it correctly
# computes the start of the function.
# Get the symbol table.
if ![ld_nm $nm tmpdir/relax] {
unresolved $testname
return
}
# Get a disassembly.
send_log "$objdump -d tmpdir/relax >tmpdir/relax.dis\n"
verbose "$objdump -d tmpdir/relax >tmpdir/relax.dis"
catch "exec $objdump -d tmpdir/relax >tmpdir/relax.dis" exec_output
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose $exec_output
unresolved $testname
return
}
set balcnt 0
set file [open tmpdir/relax.dis r]
while { [gets $file line] != -1 } {
verbose "$line" 2
if ![string match "*bal*" $line] {
continue
}
verbose "$line"
incr balcnt
if ![regexp "^(\[0-9a-fA-F\]+) (<\[a-z+0-9A-Z.\]+>)? bal (\[0-9a-fA-F\]+)" $line whole addr label dest] {
perror "unrecognized format for $line"
unresolved $testname
return
}
if "0x$addr + 8 != 0x$dest" {
# This is a straight function call. All function calls in
# this example are to either foo or bar.
if "0x$dest != $nm_output(foo) && 0x$dest != $nm_output(bar)" {
send_log "fail 1\n"
send_log "$line\n"
fail $testname
return
}
} else {
# Pick up the next line. If it is sll, this is a switch
# prologue, and there is not much we can do to test it.
# Otherwise, it should be lui, and the next instruction
# should be an addiu, followed by an addu to $31.
if { [gets $file l] == -1 } {
send_log "fail 2\n"
send_log "$line\n"
fail $testname
return
}
verbose $l
if [string match "*sll*" $l] {
continue
}
if ![regexp "lui (\[\$a-z0-9\]+),(\[0-9a-fA-Fx\]+)" $l whole reg upper] {
send_log "fail 3\n"
send_log "$line\n"
send_log "$l\n"
fail $testname
return
}
if { [gets $file l] == -1 } {
send_log "fail 4\n"
send_log "$line\n"
fail $testname
return
}
verbose "$l"
if ![regexp "addiu \\$reg,\\$reg,(\[-0-9\]+)" $l whole lower] {
send_log "fail 5\n"
send_log "$line\n"
send_log "$l\n"
send_log "addiu \\$reg,\\$reg,(\[-0-9\]+)\n"
fail $testname
return
}
if { [gets $file l] == -1 } {
send_log "fail 6\n"
send_log "$line\n"
fail $testname
return
}
verbose "$l"
if ![regexp "addu \\$reg,\\$reg,\\\$ra" $l] {
send_log "fail 7\n"
send_log "$line\n"
send_log "$l\n"
fail $testname
return
}
# The next line will be jalr in the case of an expanded
# call. Otherwise, the code is getting the start of the
# function, and the next line can be anything.
if { [gets $file l] == -1 } {
send_log "fail 8\n"
send_log "$line\n"
fail $testname
return
}
verbose "$l"
if [string match "*jalr*" $l] {
set dest [expr 0x$addr + 8 + ($upper << 16) + $lower]
if { $dest != $nm_output(foo) && $dest != $nm_output(bar) } {
send_log "fail 9\n"
send_log "$line\n"
fail $testname
return
}
} else {
set dest [expr ($upper << 16) + $lower]
if ![regexp "<(\[.a-z\]+)\\+(\[0-9a-fA-F\]+)>" $label whole base offset] {
send_log "fail 10\n"
send_log "$line\n"
fail $testname
return
}
set offset 0x$offset
if { $base == ".foo" } {
set offset [expr $offset - ($nm_output(foo) - 0x30)]
}
if { $offset + 8 != - $dest } {
send_log "fail 11\n"
send_log "$line\n"
fail $testname
return
}
}
}
}
close $file
if {$balcnt < 10} {
send_log "fail 12\n"
fail $testname
} else {
verbose "$balcnt bal instructions"
pass $testname
}
}
# We now test actually running embedded MIPS PIC code. This can only
# be done on a MIPS host with the same endianness as our target.
if [istarget mipsel-*-*] {
if ![ishost mips*-*-ultrix*] {
return
}
} else {
if ![ishost mips*-*-irix*] {
return
}
}
set testname "run embedded PIC code"
# Compile the program which will run the test. This code must be
# compiled for the host, not the target.
send_log "$CC_FOR_HOST $CFLAGS_FOR_HOST -o tmpdir/run $srcdir/$subdir/run.c\n"
verbose "$CC_FOR_HOST $CFLAGS_FOR_HOST -o tmpdir/run $srcdir/$subdir/run.c"
catch "exec $CC_FOR_HOST $CFLAGS_FOR_HOST -o tmpdir/run $srcdir/$subdir/run.c" exec_output
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
unresolved $testname
return
}
# Compile and link the test.
if { ![ld_compile "$CC $CFLAGS -membedded-pic" $srcdir/$subdir/runtesti.s tmpdir/runtesti.o]
|| ![ld_compile "$CC $CFLAGS -membedded-pic" $srcdir/$subdir/runtest1.c tmpdir/runtest1.o]
|| ![ld_compile "$CC $CFLAGS -membedded-pic" $srcdir/$subdir/runtest2.c tmpdir/runtest2.o] } {
unresolved $testname
return
}
if ![ld_simple_link $ld tmpdir/runtest "--embedded-relocs tmpdir/runtesti.o tmpdir/runtest1.o tmpdir/runtest2.o"] {
fail $testname
} else {
# Now run the test.
send_log "tmpdir/run tmpdir/runtest\n"
verbose "tmpdir/run tmpdir/runtest"
catch "exec tmpdir/run tmpdir/runtest" exec_output
if [string match "*ran and returned 0*" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
pass $testname
} else {
send_log "$exec_output\n"
verbose "$exec_output"
fail $testname
}
}

View File

@ -1,49 +0,0 @@
OUTPUT_FORMAT("ecoff-bigmips")
SECTIONS
{
.foo 0x30 : {
tmpdir/relax3.o(.text)
tmpdir/relax1.o(.text)
}
.text 0x20000 : {
_ftext = . ;
*(.init)
eprol = .;
tmpdir/relax4.o(.text)
*(.text)
*(.fini)
etext = .;
_etext = .;
}
.rdata . : {
*(.rdata)
}
_fdata = .;
.data . : {
*(.data)
CONSTRUCTORS
}
_gp = . + 0x8000;
.lit8 . : {
*(.lit8)
}
.lit4 . : {
*(.lit4)
}
.sdata . : {
*(.sdata)
}
edata = .;
_edata = .;
_fbss = .;
.sbss . : {
*(.sbss)
*(.scommon)
}
.bss . : {
*(.bss)
*(COMMON)
}
end = .;
_end = .;
}

View File

@ -1,22 +0,0 @@
/* First source file in relaxation test. */
extern int bar ();
static int foo2 ();
int foo (int i)
{
switch (i)
{
case 0: bar (0); break;
case 1: bar (1); break;
case 2: bar (2); break;
case 3: bar (3); break;
case 4: bar (foo2); break;
case 5: bar (bar); break;
}
while (1)
if (i)
return bar ();
}
static int foo2 () { }

View File

@ -1,19 +0,0 @@
/* Second source file in relaxation test. */
int bar2 ()
{
int i;
for (i = 0; i < 100; i++)
foo ();
return foo () + foo () + foo () + foo ();
}
int bar (int i)
{
while (1)
if (i)
return foo ();
else
return foo ();
}

View File

@ -1,3 +0,0 @@
/* Third source file in relaxation test. */
int quux () { return 0; }

View File

@ -1,3 +0,0 @@
/* Fourth source file in relaxation test. */
int xyzzy () { return 0; }

View File

@ -1,160 +0,0 @@
/* Load and run a MIPS position independent ECOFF file.
Written by Ian Lance Taylor <ian@cygnus.com>
Public domain. */
/* This program will load an ECOFF file into memory and execute it.
The file must have been compiled using the GNU -membedded-pic
switch to produce position independent code. This will only work
if this program is run on a MIPS system with the same endianness as
the ECOFF file. The ECOFF file must be complete. System calls may
not work correctly.
There are further restrictions on the file (they could be removed
by doing some additional programming). The file must be aligned
such that it does not require any gaps introduced in the data
segment; the GNU linker produces such files by default. However,
the file must not assume that the text or data segment is aligned
on a page boundary. The start address must be at the start of the
text segment.
The ECOFF file is run by calling it as though it were a function.
The address of the data segment is passed as the only argument.
The file is expected to return an integer value, which will be
printed. */
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
/* Structures used in ECOFF files. We assume that a short is two
bytes and an int is four bytes. This is not much of an assumption,
since we already assume that we are running on a MIPS host with the
same endianness as the file we are examining. */
struct ecoff_filehdr {
unsigned short f_magic; /* magic number */
unsigned short f_nscns; /* number of sections */
unsigned int f_timdat; /* time & date stamp */
unsigned int f_symptr; /* file pointer to symtab */
unsigned int f_nsyms; /* number of symtab entries */
unsigned short f_opthdr; /* sizeof(optional hdr) */
unsigned short f_flags; /* flags */
};
struct ecoff_aouthdr
{
unsigned short magic; /* type of file */
unsigned short vstamp; /* version stamp */
unsigned int tsize; /* text size in bytes, padded to FW bdry*/
unsigned int dsize; /* initialized data " " */
unsigned int bsize; /* uninitialized data " " */
unsigned int entry; /* entry pt. */
unsigned int text_start; /* base of text used for this file */
unsigned int data_start; /* base of data used for this file */
unsigned int bss_start; /* base of bss used for this file */
unsigned int gprmask; /* ?? */
unsigned int cprmask[4]; /* ?? */
unsigned int gp_value; /* value for gp register */
};
#define ECOFF_SCNHDR_SIZE (40)
static void
die (s)
char *s;
{
perror (s);
exit (1);
}
int
main (argc, argv)
int argc;
char **argv;
{
FILE *f;
struct stat s;
char *z;
struct ecoff_filehdr *fh;
struct ecoff_aouthdr *ah;
unsigned int toff;
char *t, *d;
int (*pfn) ();
int ret;
if (argc != 2)
{
fprintf (stderr, "Usage: %s file\n", argv[0]);
exit (1);
}
f = fopen (argv[1], "r");
if (f == NULL)
die (argv[1]);
if (stat (argv[1], &s) < 0)
die ("stat");
z = (char *) malloc (s.st_size);
if (z == NULL)
die ("malloc");
if (fread (z, 1, s.st_size, f) != s.st_size)
die ("fread");
/* We need to figure out the start of the text segment, which is the
location we are going to call, and the start of the data segment,
which we are going to pass as an argument. We also need the size
and start address of the bss segment. This information is all in
the ECOFF a.out header. */
fh = (struct ecoff_filehdr *) z;
if (fh->f_opthdr != sizeof (struct ecoff_aouthdr))
{
fprintf (stderr, "%s: unexpected opthdr size: is %u, want %u\n",
argv[1], (unsigned int) fh->f_opthdr,
(unsigned int) sizeof (struct ecoff_aouthdr));
exit (1);
}
ah = (struct ecoff_aouthdr *) (z + sizeof (struct ecoff_filehdr));
if (ah->magic != 0413)
{
fprintf (stderr, "%s: bad aouthdr magic number 0%o (want 0413)\n",
argv[1], (unsigned int) ah->magic);
exit (1);
}
/* We should clear the bss segment at this point. This is the
ah->bsize bytes starting at ah->bss_start, To do this correctly,
we would have to make sure our memory block is large enough. It
so happens that our test case does not have any additional pages
for the bss segment--it is contained within the data segment.
So, we don't bother. */
if (ah->bsize != 0)
{
fprintf (stderr,
"%s: bss segment is %u bytes; non-zero sizes not supported\n",
argv[1], ah->bsize);
exit (1);
}
/* The text section starts just after all the headers, rounded to a
16 byte boundary. */
toff = (sizeof (struct ecoff_filehdr) + sizeof (struct ecoff_aouthdr)
+ fh->f_nscns * ECOFF_SCNHDR_SIZE);
toff += 15;
toff &=~ 15;
t = z + toff;
/* The tsize field gives us the start of the data segment. */
d = z + ah->tsize;
/* Call the code as a function. */
pfn = (int (*) ()) t;
ret = (*pfn) (d);
printf ("%s ran and returned %d\n", argv[1], ret);
exit (0);
}

View File

@ -1,117 +0,0 @@
/* First C source file for actual execution test. */
/* The main point of this test is to make sure that the code and data
are truly position independent. We statically initialize several
global variables, and make sure that they are correctly adjusted at
runtime. */
int i = 1;
int j = 0;
extern int k;
int l;
char small_buf[] = "aaaa";
char *small_pointer = small_buf;
char big_buf[] = "aaaaaaaaaaaaaaaa";
char *big_pointer = big_buf;
extern int bar ();
int (*pbar) () = bar;
static int
foo2 (arg)
int arg;
{
l = arg;
return i + j;
}
int (*pfoo2) () = foo2;
int
chkstr (z, c)
char *z;
int c;
{
/* Switch statements need extra effort to be position independent,
so we run one here, even though most of the cases will never be
taken. */
switch (c)
{
case 1:
case 2:
case 3:
return i - 1;
case 4:
break;
case 5:
case 6:
case 7:
case 8:
case 9:
return i * j;
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
return j;
case 16:
break;
default:
return 0;
}
while (c-- != 0)
if (*z++ != 'a')
return 0;
return *z == '\0';
}
/* This function is called by the assembler startup routine. It tries
to test that everything was correctly initialized. It returns 0 on
success, something else on failure. */
int
foo ()
{
if (i != 1)
return 1;
if (j != 0)
return 2;
if (! chkstr (small_buf, 4))
return 3;
if (! chkstr (small_pointer, 4))
return 4;
if (! chkstr (big_buf, 16))
return 5;
if (! chkstr (big_pointer, 16))
return 6;
if (l != 0)
return 7;
if (foo2 (1) != 1)
return 8;
if (l != 1)
return 9;
if ((*pfoo2) (2) != 1)
return 10;
if (l != 2)
return 11;
if (bar (1) != 0)
return 12;
if (bar (-1) != 1)
return 13;
if ((*pbar) (0xa5a5a5a5) != -1)
return 14;
if (k != 0xa5a5a5a5)
return 15;
if ((*pbar) (0) != 0xa5a5a5a5)
return 16;
if (k != 0)
return 17;
return 0;
}

View File

@ -1,26 +0,0 @@
/* Second C source file for actual execution test. */
int k;
extern int i;
extern int j;
extern char small_buf[];
extern char *small_pointer;
extern int chkstr ();
int
bar (n)
int n;
{
int r;
if (i != 1
|| j != 0
|| ! chkstr (small_buf, 4)
|| ! chkstr (small_pointer, 4))
return k + 1;
r = k;
k = n;
return r;
}

View File

@ -1,94 +0,0 @@
# Assembler initialization code for actual execution test.
# This code becomes the start of the execution test program. It is
# responsible for initializing the static data, invoking the C code,
# and returning the result. It is called as though it were a C
# function with an argument of the address of the data segment.
# We need to know the value of _ftext and _fdata at link time, but we
# have no way to actually get that at runtime. This is because when
# this code is compiled with -membedded-pic, the la instruction will
# be turned into an addiu $gp instruction. We work around this by
# storing the information in words in the .data section. We then load
# the values of these words *before* doing the runtime relocation.
.sdata
text_start:
.word _ftext
data_start:
.word _fdata
.globl start
.text
start:
# Grab some space on the stack, just as though we were a real
# function.
addiu $sp,$sp,-8
sw $31,0($sp)
# Save the $gp register, and set it up for our data section.
sw $gp,4($sp)
addu $gp,$4,0x8000 # macro
# The start of the data segment is in $4.
# Get the address of start into $5 in a position independent
# fashion.
.set noreorder
$LF1 = . + 8
bal $LF1
la $5,start-$LF1 # macro
.set reorder
addu $5,$5,$31
# Now get the address of _ftext into $6.
la $6,_ftext-start # macro
addu $6,$6,$5
# Get the value of _ftext used to link into $7.
lw $7,text_start # macro
# Get the value of _fdata used to link into $8.
lw $8,data_start # macro
# Get the address of __runtime_reloc_start into $9.
la $9,__runtime_reloc_start-start # macro
addu $9,$9,$5
# Get the address of __runtime_reloc_stop into $10.
la $10,__runtime_reloc_stop-start # macro
addu $10,$10,$5
# The words between $9 and $10 are the runtime initialization
# instructions. Step through and relocate them. First set
# $11 and $12 to the values to add to text and data sections,
# respectively.
subu $11,$6,$7
subu $12,$4,$8
1:
bge $9,$10,3f # macro
lw $13,0($9)
and $14,$13,0xfffffffe # macro
move $15,$11
beq $13,$14,2f
move $15,$12
2:
addu $14,$14,$4
lw $24,0($14)
addu $24,$24,$15
sw $24,0($14)
addiu $9,$9,4
b 1b
3:
# Now the statically initialized data has been relocated
# correctly, and we can call the C code which does the actual
# testing.
bal foo
# We return the value returned by the C code.
lw $31,0($sp)
lw $gp,4($sp)
addu $sp,$sp,8
j $31

View File

@ -1,6 +0,0 @@
extern int foo ();
int
func ()
{
return foo ();
}

View File

@ -1,6 +0,0 @@
NOCROSSREFS ( .text .data )
SECTIONS
{
.text : { tmpdir/cross1.o }
.data : { tmpdir/cross2.o }
}

View File

@ -1,5 +0,0 @@
int
foo ()
{
return 1;
}

View File

@ -1,6 +0,0 @@
NOCROSSREFS ( .text .data )
SECTIONS
{
.text : { *(.text) *(.pr) }
.data : { *(.data) *(.sdata) *(.rw) *(.tc0) *(.tc) }
}

View File

@ -1,7 +0,0 @@
int i = 4;
int
foo ()
{
return i;
}

View File

@ -1,77 +0,0 @@
# Test NOCROSSREFS in a linker script.
# By Ian Lance Taylor, Cygnus Support.
set test1 "NOCROSSREFS 1"
set test2 "NOCROSSREFS 2"
if { [which $CC] == 0 } {
untested $test1
untested $test2
return
}
if { ![ld_compile $CC "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
|| ![ld_compile $CC "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
unresolved $test1
unresolved $test2
return
}
set flags ""
# The a29k compiled code calls V_SPILL and V_FILL. Since we don't
# need to run this code, but we don't have definitions for those
# functions, we just define them out.
if [istarget a29k*-*-*] {
set flags "$flags --defsym V_SPILL=0 --defsym V_FILL=0"
}
# hppa-elf needs a definition for $global$.
if [istarget hppa*-*-*] {
set flags "$flags --defsym '\$global\$'=0
}
verbose -log "$ld $flags -o tmpdir/cross1 -T $srcdir/$subdir/cross1.t tmpdir/cross1.o tmpdir/cross2.o"
catch "exec $ld $flags -o tmpdir/cross1 -T $srcdir/$subdir/cross1.t tmpdir/cross1.o tmpdir/cross2.o" exec_output
set exec_output [prune_warnings $exec_output]
regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
if [string match "" $exec_output] then {
fail $test1
} else {
verbose -log "$exec_output"
if [regexp "prohibited cross reference from .* to `foo' in" $exec_output] {
pass $test1
} else {
fail $test1
}
}
# Check cross references within a single object.
if { ![ld_compile $CC "$srcdir/$subdir/cross3.c" tmpdir/cross3.o] } {
unresolved $test2
return
}
verbose -log "$ld $flags -o tmpdir/cross2 -T $srcdir/$subdir/cross2.t tmpdir/cross3.o"
catch "exec $ld $flags -o tmpdir/cross2 -T $srcdir/$subdir/cross2.t tmpdir/cross3.o" exec_output
set exec_output [prune_warnings $exec_output]
regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
if [string match "" $exec_output] then {
fail $test2
} else {
verbose -log "$exec_output"
if [regexp "prohibited cross reference from .* to `.*' in" $exec_output] {
pass $test2
} else {
fail $test2
}
}

View File

@ -1,39 +0,0 @@
# Test DEFINED in a linker script.
# By Ian Lance Taylor, Cygnus Support.
set testname "DEFINED"
set prms_id 5699
if ![ld_assemble $as $srcdir/$subdir/defined.s tmpdir/def.o] {
unresolved $testname
return
}
if ![ld_simple_link $ld tmpdir/def "-T $srcdir/$subdir/defined.t tmpdir/def.o"] {
fail $testname
} else {
if ![ld_nm $nm tmpdir/def] {
unresolved $testname
} else {
if {![info exists nm_output(value1)] \
|| ![info exists nm_output(value2)]} {
send_log "bad output from nm\n"
verbose "bad output from nm"
fail $testname
} else {
if {$nm_output(value1) != 1} {
send_log "value1 == $nm_output(value1)\n"
verbose "value1 == $nm_output(value1)"
fail $testname
} else {
if {$nm_output(value2) != 2} {
send_log "value2 == $nm_output(value2)\n"
verbose "value2 == $nm_output(value2)"
fail $testname
} else {
pass $testname
}
}
}
}
}

View File

@ -1,2 +0,0 @@
.globl defined
defined = 1

View File

@ -1,7 +0,0 @@
SECTIONS {
.text : { *(.text) }
.data : { *(.data) }
.bss : { *(.bss) *(COMMON) }
}
value1 = DEFINED (defined) ? 1 : 2;
value2 = DEFINED (undefined) ? 1 : 2;

View File

@ -1,50 +0,0 @@
# Test PHDRS in a linker script.
# By Ian Lance Taylor, Cygnus Support.
# PHDRS is only meaningful for ELF.
if { ![istarget *-*-sysv4*] \
&& ![istarget *-*-unixware*] \
&& ![istarget *-*-elf*] \
&& ![istarget *-*-linux*] \
&& ![istarget *-*-irix5*] \
&& ![istarget *-*-irix6*] \
&& ![istarget *-*-solaris2*] } {
return
}
if { [istarget *-*-linuxaout*] \
|| [istarget *-*-linuxoldld*] } {
return
}
# This is a very simplistic test.
set testname "PHDRS"
if ![ld_assemble $as $srcdir/$subdir/phdrs.s tmpdir/phdrs.o] {
unresolved $testname
return
}
set phdrs_regexp \
".*Program Header:.*PHDR *off *0x00*34 *vaddr *0x00*80034 *paddr *0x00*80034.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* flags r--.*LOAD *off *0x00* *vaddr *0x00*80000 *paddr *0x00*80000.*filesz *0x00*\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags r-x.*LOAD *off *0x0\[0-9a-f\]* *vaddr *0x00*80*\[0-9a-f\]* *paddr *0x00*80*\[0-9a-f\]*.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags *rw-.*"
if ![ld_simple_link $ld tmpdir/phdrs "-T $srcdir/$subdir/phdrs.t tmpdir/phdrs.o"] {
fail $testname
} else {
if {[which $objdump] == 0} {
unresolved $testname
return
}
verbose -log "$objdump --private tmpdir/phdrs"
catch "exec $objdump --private tmpdir/phdrs" exec_output
set exec_output [prune_warnings $exec_output]
verbose -log $exec_output
if [regexp $phdrs_regexp $exec_output] {
pass $testname
} else {
fail $testname
}
}

View File

@ -1,8 +0,0 @@
.text
.long 1
.data
.long 2

View File

@ -1,14 +0,0 @@
PHDRS
{
header PT_PHDR PHDRS ;
text PT_LOAD FILEHDR PHDRS ;
data PT_LOAD ;
}
SECTIONS
{
. = 0x80000 + SIZEOF_HEADERS;
.text : { *(.text) } :text
.data : { *(.data) } :data
/DISCARD/ : { *(.reginfo) }
}

View File

@ -1,64 +0,0 @@
# Test basic linker script functionality
# By Ian Lance Taylor, Cygnus Support
set testname "script"
if ![ld_assemble $as $srcdir/$subdir/script.s tmpdir/script.o] {
unresolved $testname
return
}
proc check_script { } {
global nm
global testname
global nm_output
if ![ld_nm $nm tmpdir/script] {
unresolved $testname
} else {
if {![info exists nm_output(text_start)] \
|| ![info exists nm_output(text_end)] \
|| ![info exists nm_output(data_start)] \
|| ![info exists nm_output(data_end)]} {
send_log "bad output from nm\n"
verbose "bad output from nm"
fail $testname
} else {
if {$nm_output(text_start) != 0x100} {
send_log "text_start == $nm_output(text_start)\n"
verbose "text_start == $nm_output(text_start)"
fail $testname
} else { if {$nm_output(text_end) < 0x104 \
|| $nm_output(text_end) > 0x110} {
send_log "text_end == $nm_output(text_end)\n"
verbose "text_end == $nm_output(text_end)"
fail $testname
} else { if {$nm_output(data_start) != 0x1000} {
send_log "data_start == $nm_output(data_start)\n"
verbose "data_start == $nm_output(data_start)"
fail $testname
} else { if {$nm_output(data_end) < 0x1004 \
|| $nm_output(data_end) > 0x1010} {
send_log "data_end == $nm_output(data_end)\n"
verbose "data_end == $nm_output(data_end)"
fail $testname
} else {
pass $testname
} } } }
}
}
}
if ![ld_simple_link $ld tmpdir/script "-T $srcdir/$subdir/script.t tmpdir/script.o"] {
fail $testname
} else {
check_script
}
set testname "MRI script"
if ![ld_simple_link $ld tmpdir/script "-c $srcdir/$subdir/scriptm.t"] {
fail $testname
} else {
check_script
}

View File

@ -1,8 +0,0 @@
.text
.globl text_symbol
text_symbol:
.long 1
.data
.globl data_symbol
data_symbol:
.long 2

View File

@ -1,16 +0,0 @@
SECTIONS
{
.text 0x100 : {
text_start = .;
*(.text)
*(.pr)
text_end = .;
}
. = 0x1000;
.data : {
data_start = .;
*(.data)
*(.rw)
data_end = .;
}
}

View File

@ -1,10 +0,0 @@
* MRI script
sect .text = $100 ; .text start address
sect .data = 1000h ; .data start address
public text_start = $100
public text_end = # continuation line
text_start + 4
public data_start = 1000h
public data_end = data_start + 4
load tmpdir/script.o

View File

@ -1,55 +0,0 @@
# Test SIZEOF in a linker script.
# By Ian Lance Taylor, Cygnus Support
# Based on a bug report from anders.blomdell@control.lth.se.
set testname "SIZEOF"
if ![ld_assemble $as $srcdir/$subdir/sizeof.s tmpdir/sizeof.o] {
unresolved $testname
return
}
if ![ld_simple_link $ld tmpdir/sizeof "-T $srcdir/$subdir/sizeof.t tmpdir/sizeof.o"] {
fail $testname
return
}
if ![ld_nm $nm tmpdir/sizeof] {
unresolved $testname
return
}
if {![info exists nm_output(text_start)] \
|| ![info exists nm_output(text_end)] \
|| ![info exists nm_output(data_start)] \
|| ![info exists nm_output(data_end)] \
|| ![info exists nm_output(sizeof_text)] \
|| ![info exists nm_output(sizeof_data)]} {
send_log "bad output from nm\n"
verbose "bad output from nm"
fail $testname
return
}
if {$nm_output(text_end) - $nm_output(text_start) != $nm_output(sizeof_text)} {
send_log "text_end - text_start != sizeof_text\n"
verbose "text_end - text_start != sizeof_text"
fail $testname
return
}
if {$nm_output(data_end) - $nm_output(data_start) != $nm_output(sizeof_data)} {
send_log "data_end - data_start != sizeof_data\n"
verbose "data_end - data_start != sizeof_data"
fail $testname
return
}
if {$nm_output(sizeof_text) != $nm_output(sizeof_data)} {
send_log "sizeof_text != sizeof_data\n"
verbose "sizeof_text != sizeof_data"
fail $testname
return
}
pass $testname

View File

@ -1 +0,0 @@
.space 16

View File

@ -1,17 +0,0 @@
SECTIONS {
.text :
{
text_start = .;
tmpdir/sizeof.o
text_end = .;
}
.data :
{
data_start = .;
. = . + SIZEOF(.text);
data_end = .;
}
}
sizeof_text = SIZEOF(.text);
sizeof_data = SIZEOF(.data);

View File

@ -1,143 +0,0 @@
# Expect script for ld-sh tests
# Copyright (C) 1995, 1996, 1997 Free Software Foundation
#
# This file 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.
#
# Written by Ian Lance Taylor (ian@cygnus.com)
#
# Test SH relaxing. This tests the compiler and assembler as well as
# the linker.
if ![istarget sh*-*-*] {
return
}
set testsimple "SH simple relaxing"
if ![ld_assemble $as "-relax $srcdir/$subdir/sh1.s" tmpdir/sh1.o] {
unresolved $testsimple
} else { if ![ld_simple_link $ld tmpdir/sh1 "-relax tmpdir/sh1.o"] {
fail $testsimple
} else {
if ![ld_nm $nm tmpdir/sh1] {
unresolved $testsimple
} else {
if {![info exists nm_output(bar)] \
|| ![info exists nm_output(foo)]} {
send_log "bad output from nm\n"
verbose "bad output from nm"
fail $testsimple
} else {
if {$nm_output(bar) != $nm_output(foo) + 4} {
send_log "foo == $nm_output(foo)\n"
verbose "foo == $nm_output(foo)"
send_log "bar == $nm_output(bar)\n"
verbose "bar == $nm_output(bar)"
fail $testsimple
} else {
pass $testsimple
}
}
}
} }
set testsrec "SH relaxing to S-records"
if ![ld_simple_link $ld tmpdir/sh1.s1 "-relax -oformat srec tmpdir/sh1.o"] {
fail $testsrec
} else {
# The file name is embedded in the S-records, so create both
# files with the same name.
catch "exec rm -f tmpdir/sh1.s2" exec_output
send_log "mv tmpdir/sh1.s1 tmpdir/sh1.s2\n"
verbose "mv tmpdir/sh1.s1 tmpdir/sh1.s2"
catch "exec mv tmpdir/sh1.s1 tmpdir/sh1.s2" exec_output
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
unresolved $testsrec
} else {
send_log "$objcopy -O srec tmpdir/sh1 tmpdir/sh1.s1"
verbose "$objcopy -O srec tmpdir/sh1 tmpdir/sh1.s1"
catch "exec $objcopy -O srec tmpdir/sh1 tmpdir/sh1.s1" exec_output
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
unresolved $testsrec
} else {
send_log "cmp tmpdir/sh1.s1 tmpdir/sh1.s2\n"
verbose "cmp tmpdir/sh1.s1 tmpdir/sh1.s2"
catch "exec cmp tmpdir/sh1.s1 tmpdir/sh1.s2" exec_output
set exec_output [prune_warnings $exec_output]
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
fail $testsrec
} else {
pass $testsrec
}
}
}
}
set testlink "SH relaxing"
set testjsr "SH confirm relaxing"
set testrun "SH relaxing execution"
if { [which $CC] == 0 } {
untested $testlink
untested $testjsr
untested $testrun
return
}
if {![ld_assemble $as "-relax $srcdir/$subdir/start.s" tmpdir/start.o] \
|| ![ld_compile $CC "-O -mrelax $srcdir/$subdir/sh2.c" tmpdir/sh2.o]} {
unresolved $testlink
unresolved $testjsr
unresolved $testrun
return
}
if ![ld_simple_link $ld tmpdir/sh2 "-relax tmpdir/start.o tmpdir/sh2.o"] {
fail $testlink
unresolved $testjsr
unresolved $testrun
return
}
pass $testlink
send_log "$objdump -d tmpdir/sh2\n"
verbose "$objdump -d tmpdir/sh2"
catch "exec $objdump -d tmpdir/sh2" exec_output
if [string match "*jsr*" $exec_output] {
fail $testjsr
} else {
pass $testjsr
}
if { ![info exists SIM] || [which $SIM] == 0 } {
untested $testrun
return
}
set status [catch "exec $SIM tmpdir/sh2" exec_output]
if { $status == 0 } {
pass $testrun
} else {
fail $testrun
}

View File

@ -1,13 +0,0 @@
.text
foo:
L1:
mov.l L2,r0
.uses L1
jsr @r0
rts
.align 2
L2:
.long bar
bar:
rts
.align 4

View File

@ -1,120 +0,0 @@
int global;
extern void trap (int, int);
static void quit (int);
static int foo (int);
int
main ()
{
if (foo (0) != 0 || global != 0)
quit (1);
if (foo (1) != 1 || global != 1)
quit (1);
if (foo (2) != 2 || global != 2)
quit (1);
if (foo (3) != 3 || global != 3)
quit (1);
if (foo (4) != 4 || global != 4)
quit (1);
if (foo (5) != 5 || global != 5)
quit (1);
if (foo (6) != 6 || global != 6)
quit (1);
if (foo (7) != 7 || global != 7)
quit (1);
if (foo (8) != 8 || global != 8)
quit (1);
quit (0);
}
void
__main ()
{
}
static void
quit (int status)
{
trap (1, status);
}
int
bar (int i)
{
global = i;
return i;
}
int
bar0 (int i)
{
global = 0;
return i;
}
int
bar1 (int i)
{
global = 1;
return i;
}
int
bar2 (int i)
{
global = 2;
return i;
}
int
bar3 (int i)
{
global = 3;
return i;
}
int
bar4 (int i)
{
global = 4;
return i;
}
int
bar5 (int i)
{
global = 5;
return i;
}
int
bar6 (int i)
{
global = 6;
return i;
}
int
bar7 (int i)
{
global = 7;
return i;
}
int
foo (int i)
{
switch (i)
{
case 0: bar0 (0); return 0;
case 1: bar1 (1); return 1;
case 2: bar2 (2); return 2;
case 3: bar3 (3); return 3;
case 4: bar4 (4); return 4;
case 5: bar5 (5); return 5;
case 6: bar6 (6); return 6;
case 7: bar7 (7); return 7;
default: return bar (i);
}
}

View File

@ -1,27 +0,0 @@
.section .text
.global start
start:
mov.l stack_k,r15
! call the mainline
L1:
mov.l main_k,r0
.uses L1
jsr @r0
nop
.align 2
stack_k:
.long _stack
main_k:
.long _main
.global _trap
_trap:
trapa #3
rts
nop
.section .stack
_stack: .long 0xdeaddead

View File

@ -1,72 +0,0 @@
/* This is the main program for the shared library test. */
#include <stdio.h>
int mainvar = 1;
int overriddenvar = 2;
extern int shlibvar1;
extern int shlib_mainvar ();
extern int shlib_overriddenvar ();
extern int shlib_shlibvar1 ();
extern int shlib_shlibvar2 ();
extern int shlib_shlibcall ();
extern int shlib_maincall ();
extern int shlib_checkfunptr1 ();
extern int shlib_checkfunptr2 ();
extern int (*shlib_getfunptr1 ()) ();
extern int (*shlib_getfunptr2 ()) ();
extern int shlib_check ();
/* This function is called by the shared library. */
int
main_called ()
{
return 6;
}
int
main ()
{
int (*p) ();
printf ("mainvar == %d\n", mainvar);
printf ("overriddenvar == %d\n", overriddenvar);
printf ("shlibvar1 == %d\n", shlibvar1);
#ifndef XCOFF_TEST
printf ("shlib_mainvar () == %d\n", shlib_mainvar ());
printf ("shlib_overriddenvar () == %d\n", shlib_overriddenvar ());
#endif
printf ("shlib_shlibvar1 () == %d\n", shlib_shlibvar1 ());
printf ("shlib_shlibvar2 () == %d\n", shlib_shlibvar2 ());
printf ("shlib_shlibcall () == %d\n", shlib_shlibcall ());
#ifndef XCOFF_TEST
printf ("shlib_maincall () == %d\n", shlib_maincall ());
#endif
printf ("main_called () == %d\n", main_called ());
printf ("shlib_checkfunptr1 (shlib_shlibvar1) == %d\n",
shlib_checkfunptr1 (shlib_shlibvar1));
#ifndef XCOFF_TEST
printf ("shlib_checkfunptr2 (main_called) == %d\n",
shlib_checkfunptr2 (main_called));
#endif
p = shlib_getfunptr1 ();
printf ("shlib_getfunptr1 () ");
if (p == shlib_shlibvar1)
printf ("==");
else
printf ("!=");
printf (" shlib_shlibvar1\n");
#ifndef XCOFF_TEST
p = shlib_getfunptr2 ();
printf ("shlib_getfunptr2 () ");
if (p == main_called)
printf ("==");
else
printf ("!=");
printf (" main_called\n");
#endif
printf ("shlib_check () == %d\n", shlib_check ());
return 0;
}

View File

@ -1,147 +0,0 @@
/* This is part of the shared library ld test. This file becomes part
of a shared library. */
/* This variable is supplied by the main program. */
#ifndef XCOFF_TEST
extern int mainvar;
#endif
/* This variable is defined in the shared library, and overridden by
the main program. */
#ifndef XCOFF_TEST
int overriddenvar = -1;
#endif
/* This variable is defined in the shared library. */
int shlibvar1 = 3;
/* This variable is defined by another object in the shared library. */
extern int shlibvar2;
/* These functions return the values of the above variables as seen in
the shared library. */
#ifndef XCOFF_TEST
int
shlib_mainvar ()
{
return mainvar;
}
#endif
#ifndef XCOFF_TEST
int
shlib_overriddenvar ()
{
return overriddenvar;
}
#endif
int
shlib_shlibvar1 ()
{
return shlibvar1;
}
int
shlib_shlibvar2 ()
{
return shlibvar2;
}
/* This function calls a function defined by another object in the
shared library. */
extern int shlib_shlibcalled ();
int
shlib_shlibcall ()
{
return shlib_shlibcalled ();
}
/* This function calls a function defined by the main program. */
#ifndef XCOFF_TEST
extern int main_called ();
int
shlib_maincall ()
{
return main_called ();
}
#endif
/* This function is passed a function pointer to shlib_mainvar. It
confirms that the pointer compares equally. */
int
shlib_checkfunptr1 (p)
int (*p) ();
{
return p == shlib_shlibvar1;
}
/* This function is passed a function pointer to main_called. It
confirms that the pointer compares equally. */
#ifndef XCOFF_TEST
int
shlib_checkfunptr2 (p)
int (*p) ();
{
return p == main_called;
}
#endif
/* This function returns a pointer to shlib_mainvar. */
int
(*shlib_getfunptr1 ()) ()
{
return shlib_shlibvar1;
}
/* This function returns a pointer to main_called. */
#ifndef XCOFF_TEST
int
(*shlib_getfunptr2 ()) ()
{
return main_called;
}
#endif
/* This function makes sure that constant data and local functions
work. */
#ifndef __STDC__
#define const
#endif
static int i = 6;
static const char *str = "Hello, world\n";
int
shlib_check ()
{
const char *s1, *s2;
if (i != 6)
return 0;
/* To isolate the test, don't rely on any external functions, such
as strcmp. */
s1 = "Hello, world\n";
s2 = str;
while (*s1 != '\0')
if (*s1++ != *s2++)
return 0;
if (*s2 != '\0')
return 0;
if (shlib_shlibvar1 () != 3)
return 0;
return 1;
}

View File

@ -1,14 +0,0 @@
/* This is part of the shared library ld test. This file becomes part
of a shared library. */
/* This variable is defined here, and referenced by another file in
the shared library. */
int shlibvar2 = 4;
/* This function is called by another file in the shared library. */
int
shlib_shlibcalled ()
{
return 5;
}

View File

@ -1,15 +0,0 @@
mainvar == 1
overriddenvar == 2
shlibvar1 == 3
shlib_mainvar () == 1
shlib_overriddenvar () == 2
shlib_shlibvar1 () == 3
shlib_shlibvar2 () == 4
shlib_shlibcall () == 5
shlib_maincall () == 6
main_called () == 6
shlib_checkfunptr1 (shlib_shlibvar1) == 1
shlib_checkfunptr2 (main_called) == 1
shlib_getfunptr1 () == shlib_shlibvar1
shlib_getfunptr2 () == main_called
shlib_check () == 1

View File

@ -1,248 +0,0 @@
# Expect script for ld-shared tests
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation
#
# This file 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.
#
# Written by Ian Lance Taylor (ian@cygnus.com)
#
# Make sure that ld can generate ELF shared libraries.
# Note that linking against ELF shared libraries is tested by the
# bootstrap test.
# This test can only be run if ld generates native executables.
if ![isnative] then {return}
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
if { ![istarget i386-*-sysv4*] \
&& ![istarget i486-*-sysv4*] \
&& ![istarget i586-*-sysv4*] \
&& ![istarget i386-*-unixware] \
&& ![istarget i486-*-unixware] \
&& ![istarget i586-*-unixware] \
&& ![istarget i386-*-elf*] \
&& ![istarget i486-*-elf*] \
&& ![istarget i586-*-elf*] \
&& ![istarget i386-*-linux*] \
&& ![istarget i486-*-linux*] \
&& ![istarget i586-*-linux*] \
&& ![istarget m68k-*-linux*] \
&& ![istarget mips*-*-irix5*] \
&& ![istarget sparc*-*-elf] \
&& ![istarget sparc*-*-solaris2*] \
&& ![istarget sparc*-*-sunos4*] \
&& ![istarget rs6000*-*-aix*] \
&& ![istarget powerpc*-*-aix*] } {
return
}
if { [istarget i386-*-linuxaout*] \
|| [istarget i486-*-linuxaout*] \
|| [istarget i586-*-linuxaout*] \
|| [istarget i386-*-linuxoldld*] \
|| [istarget i486-*-linuxoldld*] \
|| [istarget i586-*-linuxoldld*] \
|| [istarget m68k-*-linuxaout*] } {
return
}
set tmpdir tmpdir
set SHCFLAG ""
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
# AIX shared libraries do not seem to support useful features,
# like overriding the shared library function or letting the
# shared library refer to objects defined in the main program. We
# avoid testing those features.
set SHCFLAG "-DXCOFF_TEST"
# The AIX 3.2.5 loader appears to randomly fail when loading
# shared libraries from NSF mounted partitions, so we avoid any
# potential problems by using a local directory.
catch {exec /bin/sh -c "echo $$"} pid
set tmpdir /usr/tmp/ld.$pid
catch "exec mkdir $tmpdir" exec_status
# On AIX, we need to explicitly export the symbols the shared
# library is going to provide, and need.
set file [open $tmpdir/xcoff.exp w]
puts $file shlibvar1
puts $file shlibvar2
puts $file shlib_shlibvar1
puts $file shlib_shlibvar2
puts $file shlib_shlibcall
puts $file shlib_shlibcalled
puts $file shlib_checkfunptr1
puts $file shlib_getfunptr1
puts $file shlib_check
close $file
}
# The test procedure.
proc shared_test { progname testname main sh1 sh2 dat } {
global ld
global srcdir
global subdir
global exec_output
global host_triplet
global tmpdir
# Build the shared library.
# On AIX, we need to use an export file.
set shared -shared
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
set shared "-bM:SRE -bE:$tmpdir/xcoff.exp"
}
if {![ld_simple_link $ld $tmpdir/$progname.so "$shared $tmpdir/$sh1 $tmpdir/$sh2"]} {
fail "$testname"
return
}
# Link against the shared library. Use -rpath so that the
# dynamic linker can locate the shared library at runtime.
# On AIX, we must include /lib in -rpath, as otherwise the loader
# can not find -lc.
set rpath $tmpdir
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
set rpath /lib:$tmpdir
}
if ![ld_link $ld $tmpdir/$progname "-rpath $rpath $tmpdir/$main $tmpdir/$progname.so"] {
fail "$testname"
return
}
# Run the resulting program
send_log "$tmpdir/$progname >$tmpdir/$progname.out\n"
verbose "$tmpdir/$progname >$tmpdir/$progname.out"
catch "exec $tmpdir/$progname >$tmpdir/$progname.out" exec_output
if ![string match "" $exec_output] then {
send_log "$exec_output\n"
verbose "$exec_output"
fail "$testname"
return
}
send_log "diff $tmpdir/$progname.out $srcdir/$subdir/$dat.dat\n"
verbose "diff $tmpdir/$progname.out $srcdir/$subdir/$dat.dat"
catch "exec diff $tmpdir/$progname.out $srcdir/$subdir/$dat.dat" exec_output
set exec_output [prune_warnings $exec_output]
if {![string match "" $exec_output]} then {
send_log "$exec_output\n"
verbose "$exec_output"
fail "$testname"
return
}
pass "$testname"
}
if [istarget mips*-*-*] {
set picflag ""
} else {
# Unfortunately, the gcc argument is -fpic and the cc argument is
# -KPIC. We have to try both.
set picflag "-fpic"
send_log "$CC $picflag\n"
verbose "$CC $picflag"
catch "exec $CC $picflag" exec_output
send_log "$exec_output\n"
verbose "--" "$exec_output"
if { [string match "*illegal option*" $exec_output] \
|| [string match "*option ignored*" $exec_output] \
|| [string match "*unrecognized option*" $exec_output] \
|| [string match "*passed to ld*" $exec_output] } {
if [istarget *-*-sunos4*] {
set picflag "-pic"
} else {
set picflag "-KPIC"
}
}
}
verbose "Using $picflag to compile PIC code"
# Compile the main program.
if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
unresolved "shared (non PIC)"
unresolved "shared"
} else {
# The shared library is composed of two files. First compile them
# without using -fpic. That should work on an ELF system,
# although it will be less efficient because the dynamic linker
# will need to do more relocation work. However, note that not
# using -fpic will cause some of the tests to return different
# results.
if { ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
|| ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
unresolved "shared (non PIC)"
} else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
shared_test shnp "shared (nonPIC)" mainnp.o sh1np.o sh2np.o xcoff
} else {
# SunOS can not handle non PIC code in a shared library
setup_xfail "*-*-sunos4*"
shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
} }
# Now compile the code using -fpic.
if { ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
|| ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
unresolved "shared"
} else {
# SunOS can not compare function pointers correctly
if [istarget "*-*-sunos4*"] {
shared_test shp "shared" mainnp.o sh1p.o sh2p.o sun4
} else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
shared_test shp "shared" mainnp.o sh1p.o sh2p.o xcoff
} else {
shared_test shp "shared" mainnp.o sh1p.o sh2p.o shared
} }
}
}
# Now do the same tests again, but this time compile main.c PIC.
if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
unresolved "shared (PIC main, non PIC so)"
unresolved "shared (PIC main)"
} else {
if { [file exists $tmpdir/sh1np.o ] && [ file exists $tmpdir/sh2np.o ] } {
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o xcoff
} else {
# SunOS can not handle non PIC code in a shared library
setup_xfail "*-*-sunos4*"
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
}
} else {
unresolved "shared (PIC main, non PIC so)"
}
if { [file exists $tmpdir/sh1p.o ] && [ file exists $tmpdir/sh2p.o ] } {
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
shared_test shmpp "shared (PIC main)" mainp.o sh1p.o sh2p.o xcoff
} else {
shared_test shmpp "shared (PIC main)" mainp.o sh1p.o sh2p.o shared
}
} else {
unresolved "shared (PIC main)"
}
}
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
# Remove the temporary directory.
catch "exec rm -rf $tmpdir" exec_status
}

View File

@ -1,15 +0,0 @@
mainvar == 1
overriddenvar == 2
shlibvar1 == 3
shlib_mainvar () == 1
shlib_overriddenvar () == 2
shlib_shlibvar1 () == 3
shlib_shlibvar2 () == 4
shlib_shlibcall () == 5
shlib_maincall () == 6
main_called () == 6
shlib_checkfunptr1 (shlib_shlibvar1) == 0
shlib_checkfunptr2 (main_called) == 1
shlib_getfunptr1 () != shlib_shlibvar1
shlib_getfunptr2 () == main_called
shlib_check () == 1

View File

@ -1,10 +0,0 @@
mainvar == 1
overriddenvar == 2
shlibvar1 == 3
shlib_shlibvar1 () == 3
shlib_shlibvar2 () == 4
shlib_shlibcall () == 5
main_called () == 6
shlib_checkfunptr1 (shlib_shlibvar1) == 1
shlib_getfunptr1 () == shlib_shlibvar1
shlib_check () == 1

View File

@ -1,25 +0,0 @@
/* This file is compiled and linked into the S-record format. */
extern int e1;
extern int e2;
int i;
int j = 1;
static int k;
static int l = 1;
static char ab[] = "This is a string constant";
extern int fn1 ();
extern int fn2 ();
int
main ()
{
fn1 (ab);
fn2 ("static string constant");
return e1 + e2 + i + j + k + l;
}
int
__main ()
{
}

View File

@ -1,18 +0,0 @@
/* This file is compiled and linked into the S-record format. */
int e1;
int e2 = 1;
int
fn1 (s)
char *s;
{
return s[e1];
}
int
fn2 (s)
char *s;
{
return s[e2];
}

View File

@ -1,80 +0,0 @@
// This file is compiled and linked into the S-record format.
#define FOO_MSG_LEN 80
class Foo {
static int foos;
int i;
const len = FOO_MSG_LEN;
char message[len];
public:
static void init_foo ();
static int nb_foos() { return foos; }
Foo();
Foo( char* message);
Foo(const Foo&);
Foo & operator= (const Foo&);
~Foo ();
};
static Foo static_foo( "static_foo");
int
main ()
{
Foo automatic_foo( "automatic_foo");
return 0;
}
extern "C" {
int
__main ()
{
}
int
__builtin_delete ()
{
}
int
__builtin_new ()
{
}
}
int Foo::foos = 0;
void Foo::init_foo ()
{
foos = 80;
}
Foo::Foo ()
{
i = ++foos;
}
Foo::Foo (char* msg)
{
i = ++foos;
}
Foo::Foo (const Foo& foo)
{
i = ++foos;
for (int k = 0; k < FOO_MSG_LEN; k++)
message[k] = foo.message[k];
}
Foo& Foo::operator= (const Foo& foo)
{
for (int k = 0; k < FOO_MSG_LEN; k++)
message[k] = foo.message[k];
return *this;
}
Foo::~Foo ()
{
foos--;
}

View File

@ -1,324 +0,0 @@
# Test linking directly to S-records.
# By Ian Lance Taylor, Cygnus Support.
# Public domain.
# Get the offset from an S-record line to the start of the data.
proc srec_off { l } {
if [string match "S1*" $l] {
return 8
} else { if [string match "S2*" $l] {
return 10
} else { if [string match "S3*" $l] {
return 12
} else {
return -1
} } }
}
# See if an S-record line contains only zero data.
proc srec_zero { l } {
if [string match "S\[0789\]*" $l] {
return 1
}
# Strip the address and checksum.
if [string match "S\[123\]*" $l] {
set l [string range $l [srec_off $l] [expr [string length $l] - 3]]
} else {
return 0
}
# The rest must be zero.
return [string match "" [string trim $l "0"]]
}
# Get the address of an S-record line.
proc srec_addr { l } {
if [string match "S\[123\]*" $l] {
set addr [string range $l 4 [expr [srec_off $l] - 1]]
} else {
return -1
}
return "0x$addr"
}
# Get the number of data bytes in an S-record line.
proc srec_len { l } {
if ![string match "S\[123\]*" $l] {
return 0
}
return [expr "0x[string range $l 2 3]" - ([srec_off $l] - 4) / 2 - 1]
}
# Extract bytes from an S-record line.
proc srec_extract { l start len } {
set off [srec_off $l]
set rlen [srec_len $l]
set stop [expr $start + $len]
if { $stop > $rlen } {
set stop [expr $rlen]
}
set start [expr $start * 2 + $off]
set stop [expr $stop * 2 + $off - 1]
return [string range $l $start $stop]
}
# See if a range of bytes in an S-record line is all zeroes.
proc srec_zero_range { l start len } {
return [string match "" [string trim [srec_extract $l $start $len] "0"]]
}
# Trim an S-record line such that the specified number of bytes remain
# at the end.
proc srec_trim { l leave } {
set off [srec_off $l]
set addr [srec_addr $l]
set len [srec_len $l]
if { $leave >= $len } {
return $l
}
set s1 [string range $l 0 1]
set s2 [format "%02x" [expr ($off - 4) / 2 + $leave + 1]]
set s3 [format "%0[expr $off - 4]x" [expr $addr + $len - $leave]]
set s4 [string range $l [expr [string length $l] - ($leave * 2) - 2] end]
set s "${s1}${s2}${s3}${s4}"
verbose "srec_trim { '$l' $leave } returning '$s'" 2
return $s
}
# Report failure when comparing S-record lines
proc srec_compare_fail { which l1 l2 } {
send_log "comparison failure $which:\n$l1\n$l2\n"
verbose "comparison failure $which:\n$l1\n$l2"
}
# Compare S-record files. We don't want to fuss about things like
# extra zeroes. Note that BFD always sorts S-records by address.
proc srec_compare { f1 f2 } {
set e1 [gets $f1 l1]
set e2 [gets $f2 l2]
while { $e1 != -1 } {
set l1 [string trimright $l1 "\r\n"]
set l2 [string trimright $l2 "\r\n"]
if { $e2 == -1 } {
# If l1 contains data, it must be zero.
if ![srec_zero $l1] {
send_log "data after EOF: $l1\n"
verbose "data after EOF: $l1"
return 0
}
} else { if { [string compare $l1 $l2] == 0 } {
set e1 [gets $f1 l1]
set e2 [gets $f2 l2]
} else { if { [srec_zero $l1] } {
set e1 [gets $f1 l1]
} else { if { [srec_zero $l2] } {
set e2 [gets $f2 l2]
} else {
# The strings are not the same, and neither is all zeroes.
set a1 [srec_addr $l1]
set n1 [srec_len $l1]
set a2 [srec_addr $l2]
set n2 [srec_len $l2]
if { $a1 < $a2 && ![srec_zero_range $l1 0 [expr $a2 - $a1]] } {
verbose "$a1 $a2 [srec_extract $l1 0 [expr $a2 - $a1]]" 2
srec_compare_fail 1 $l1 $l2
return 0
}
if { $a2 < $a1 && ![srec_zero_range $l2 0 [expr $a1 - $a2]] } {
srec_compare_fail 2 $l1 $l2
return 0
}
# Here we know that any initial data in both lines is
# zero. Now make sure that any overlapping data matches.
if { $a1 < $a2 } {
set os1 [expr $a2 - $a1]
set os2 0
} else {
set os1 0
set os2 [expr $a1 - $a2]
}
if { $a1 + $n1 < $a2 + $n2 } {
set ol [expr $n1 - $os1]
} else {
set ol [expr $n2 - $os2]
}
set x1 [srec_extract $l1 $os1 $ol]
set x2 [srec_extract $l2 $os2 $ol]
if { [string compare $x1 $x2] != 0 } {
verbose "$os1 $ol $x1" 2
verbose "$os2 $ol $x2" 2
srec_compare_fail 3 $l1 $l2
return 0
}
# These strings match. Trim the data from the larger
# string, read a new copy of the smaller string, and
# continue.
if { $a1 + $n1 < $a2 + $n2 } {
set l2 [srec_trim $l2 [expr ($a2 + $n2) - ($a1 + $n1)]]
set e1 [gets $f1 l1]
} else { if { $a1 + $n1 > $a2 + $n2 } {
set l1 [srec_trim $l1 [expr ($a1 + $n1) - ($a2 + $n2)]]
set e2 [gets $f2 l2]
} else {
set e1 [gets $f1 l1]
set e2 [gets $f2 l2]
} }
} } } }
}
# We've reached the end of the first file. The remainder of the
# second file must contain only zeroes.
while { $e2 != -1 } {
set l2 [string trimright $l2 "\r\n"]
if ![srec_zero $l2] {
send_log "data after EOF: $l2\n"
verbose "data after EOF: $l2"
return 0
}
set e2 [gets $f2 l2]
}
return 1
}
# Link twice, objcopy, and compare
proc run_srec_test { test objs } {
global ld
global objcopy
global sizeof_headers
global host_triplet
set flags ""
# If the linker script uses SIZEOF_HEADERS, use a -Ttext argument
# to force both the normal link and the S-record link to be put in
# the same place. We don't always use -Ttext because it interacts
# poorly with a.out.
if { $sizeof_headers } {
set flags "$flags -Ttext 0x1000"
}
# The a29k compiled code calls V_SPILL and V_FILL. Since we don't
# need to run this code, but we don't have definitions for those
# functions, we just define them out.
if [istarget a29k*-*-*] {
set flags "$flags --defsym V_SPILL=0 --defsym V_FILL=0"
}
# PowerPC EABI code calls __eabi.
if [istarget powerpc*-*-eabi*] {
set flags "$flags --defsym __eabi=0"
}
if { ![ld_simple_link $ld tmpdir/sr1 "$flags $objs"] \
|| ![ld_simple_link $ld tmpdir/sr2.sr "$flags -oformat srec $objs"] } {
setup_xfail "hppa*-*-*elf*"
fail $test
return
}
send_log "$objcopy -O srec tmpdir/sr1 tmpdir/sr1.sr\n"
verbose "$objcopy -O srec tmpdir/sr1 tmpdir/sr1.sr"
catch "exec $objcopy -O srec tmpdir/sr1 tmpdir/sr1.sr" exec_output
set exec_output [prune_warnings $exec_output]
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
unresolved $test
return
}
set f1 [open tmpdir/sr1.sr r]
set f2 [open tmpdir/sr2.sr r]
if [srec_compare $f1 $f2] {
pass $test
} else {
fail $test
}
close $f1
close $f2
}
set test1 "S-records"
set test2 "S-records with constructors"
# See whether the default linker script uses SIZEOF_HEADERS.
catch "exec $ld --verbose" exec_output
set sizeof_headers [string match "*SIZEOF_HEADERS*" $exec_output]
# First test linking a C program. We don't require any libraries. We
# link it normally, and objcopy to the S-record format, and then link
# directly to the S-record format, and require that the two files
# contain the same data.
if { [which $CC] == 0 } {
untested $test1
untested $test2
return
}
if { ![ld_compile $CC $srcdir/$subdir/sr1.c tmpdir/sr1.o] \
|| ![ld_compile $CC $srcdir/$subdir/sr2.c tmpdir/sr2.o] } {
unresolved $test1
unresolved $test2
return
}
# The i386-aout target is confused: the linker does not put the
# sections where objdump finds them. I don't know which is wrong.
setup_xfail "i*86-*-aout*"
# These tests fail on the native MIPS ELF targets because the GP value
# in the .reginfo section is not updated when the S-record version is
# written out. The mips-elf target itself does not use a .reginfo section.
setup_xfail "mips*-*-irix5*" "mips*-*-irix6*"
# The S-record linker doesn't do the magic TOC handling that XCOFF
# linkers do.
setup_xfail "*-*-aix*" "*-*-xcoff*"
run_srec_test $test1 "tmpdir/sr1.o tmpdir/sr2.o"
# Now try linking a C++ program with global constructors and
# destructors. Note that since we are not linking against any
# libraries, this program won't actually work or anything.
if { [which $CXX] == 0 } {
untested $test2
return
}
if ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/sr3.cc tmpdir/sr3.o] {
unresolved $test2
return
}
# See above.
setup_xfail "i*86-*-aout*"
setup_xfail "mips*-*-irix5*" "mips*-*-irix6*"
setup_xfail "*-*-aix*" "*-*-xcoff*"
run_srec_test $test2 "tmpdir/sr3.o"

View File

@ -1,10 +0,0 @@
/* This file is used to test the linker's reporting of undefined
symbols. */
extern int this_function_is_not_defined ();
int
function ()
{
return this_function_is_not_defined ();
}

View File

@ -1,85 +0,0 @@
# Test that the linker reports undefined symbol errors correctly.
# By Ian Lance Taylor, Cygnus Support
#
# Copyright (C) 1995, 1996, 1997 Free Software Foundation
#
# This file 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.
set testund "undefined"
set testfn "undefined function"
set testline "undefined line"
if { [which $CC] == 0 } {
untested $testund
untested $testfn
untested $testline
return
}
if ![ld_compile "$CC -g" $srcdir/$subdir/undefined.c tmpdir/undefined.o] {
unresolved $testund
unresolved $testfn
unresolved $testline
return
}
catch "exec rm -f tmpdir/undefined" exec_output
# Using -e start prevents the SunOS linker from trying to build a
# shared library.
send_log "$ld -e start -o tmpdir/undefined tmpdir/undefined.o\n"
verbose "$ld -e start -o tmpdir/undefined tmpdir/undefined.o"
catch "exec $ld -e start -o tmpdir/undefined tmpdir/undefined.o" exec_output
send_log "$exec_output\n"
verbose "$exec_output"
proc checkund { string testname } {
global exec_output
if [string match "*$string*" $exec_output] {
pass $testname
} else {
fail $testname
}
}
set mu "undefined reference to `this_function_is_not_defined'"
checkund $mu $testund
# ARM PE defaults to using stabs debugging, which we can't handle for
# a COFF file.
setup_xfail "arm*-*-pe*"
# Just doesn't work for PA ELF. No clue why.
setup_xfail "hppa*-*-*elf*"
set mf "tmpdir/undefined.o: In function `function':"
checkund $mf $testfn
# COFF SH gets this test wrong--it reports line 10, because although
# the jump is at line 9, the function address, and the reloc, is
# stored at the end of the function.
setup_xfail "sh-*-*"
# ARM PE defaults to using stabs debugging, which we can't handle for
# a COFF file.
setup_xfail "arm*-*-pe*"
# Just doesn't work for PA ELF. No clue why.
setup_xfail "hppa*-*-*elf*"
set ml "undefined.c:9: undefined reference to `this_function_is_not_defined'"
checkund $ml $testline

Binary file not shown.

Binary file not shown.

View File

@ -1,281 +0,0 @@
OUTPUT_FORMAT("srec")
SECTIONS
{
.text 0 : { *("9") *("10") *("11") *("12") *("13") *("14") *("15")
*("7") *("8") *("0") *("1") *("2") *("3") *("4") }
.bss (NOLOAD) : { *("5") *("6") }
.PAFI =0x00000050 ;
.PCHIO =0x000000D0 ;
.PCLO =0x00000054 ;
.PCVBSV =0x0000000E ;
.PCVTSU =0x00000012 ;
.PCVTSV =0x00000016 ;
.PCVTSVL =0x0000001A ;
.PCVTUS =0x0000001E ;
.PDIS =0x00000022 ;
.PDISL =0x00000026 ;
.PDVJ =0x0000002A ;
.PEIO =0x000000CC ;
.PEOF =0x00000058 ;
.PEOL =0x0000005C ;
.PEQUS =0x0000002E ;
.PEQUV =0x00000032 ;
.PEQUVL =0x00000036 ;
.PEQUW =0x000000DE ;
.PGCM =0x00000064 ;
.PGEQS =0x0000003A ;
.PGEQV =0x0000003E ;
.PGEQVL =0x00000042 ;
.PGET =0x00000060 ;
.PGRTS =0x00000046 ;
.PGRTV =0x0000004A ;
.PGRTVL =0x0000004E ;
.PIACT =0x0000006C ;
.PIFD =0x00000068 ;
.PINDS =0x00000052 ;
.PINDV =0x00000056 ;
.PINDVL =0x0000005A ;
.PINDW =0x000000D6 ;
.PLDCS =0x0000005E ;
.PLDCV =0x00000062 ;
.PLEQS =0x00000066 ;
.PLEQV =0x0000006A ;
.PLEQVL =0x0000006E ;
.PLESS =0x00000072 ;
.PLESV =0x00000076 ;
.PLESVL =0x0000007A ;
.PLODS =0x0000007E ;
.PLODV =0x00000082 ;
.PLODVL =0x00000086 ;
.PMODJ =0x0000008A ;
.PMOV =0x000000E2 ;
.PMPJ =0x0000008E ;
.PNEQS =0x00000092 ;
.PNEQV =0x00000096 ;
.PNEQVL =0x0000009A ;
.PNEQW =0x000000DA ;
.PPAGE =0x000000D4 ;
.PPEE =0x00000070 ;
.PPUT =0x00000074 ;
.PRDB =0x00000078 ;
.PRDC =0x0000007C ;
.PRDH =0x00000080 ;
.PRDI =0x00000084 ;
.PRDJ =0x00000088 ;
.PRDRS =0x000000C8 ;
.PRDS =0x0000008C ;
.PRDV =0x00000090 ;
.PRLN =0x00000094 ;
.PRRAN =0x00000098 ;
.PRST =0x0000009C ;
.PRWT =0x000000A0 ;
.PSCON =0x0000009E ;
.PSCOP =0x000000A2 ;
.PSDEL =0x000000A6 ;
.PSINS =0x000000AA ;
.PSLEN =0x000000AE ;
.PSPOS =0x000000B2 ;
.PSTCV =0x000000B6 ;
.PSTCVL =0x000000BA ;
.PSTOS =0x000000BE ;
.PSTOV =0x000000C2 ;
.PSTOVL =0x000000C6 ;
.PSTRS =0x000000CA ;
.PSTRV =0x000000CE ;
.PSTRVL =0x000000D2 ;
.PWLN =0x000000A4 ;
.PWRAN =0x000000A8 ;
.PWRB =0x000000AC ;
.PWRC =0x000000B0 ;
.PWRH =0x000000B4 ;
.PWRI =0x000000B8 ;
.PWRJ =0x000000BC ;
.PWRS =0x000000C0 ;
.PWRV =0x000000C4 ;
/*
.PAFI=0x = 0x00;
.PCHIO =0x 0x000000;
.PCLO =0x 64 ;
.PC;
.PCVTSU =0x 0x000000;
.PCVTSV =0x 0x000000;
.PCVTSVL =0x 0x000000;
.PCVTUS =0x 158 ;
.P;
.PDISL =0x 0x000000;
.PDVJ =0x 0x000000;
.PEIO =0x 0x000000;
.PEOF =0x 0x000000;
.PEOL =0x 0x000000;
.PEQUS =0x 0x000000;
.PEQUV =0x 0x000000;
.PEQUVL =0x 0x000000;
.PEQUW =0x 0x000000;
.PGCM =0x 0x000000;
.PGEQS =0x 0x000000;
.PGEQV =0x 0x000000;
.PGEQVL =0x 0x000000;
.PGET =0x 0x000000;
.PGRTS =0x 0x000000;
.PGRTV =0x 0x000000;
.PGRTVL =0x 0x000000;
.PIACT =0x 0x000000;
.PIFD =0x 126 ;
.P;
.PINDV =0x 0x000000;
.PINDVL =0x 0x000000;
.PINDW =0x 0x000000;
.PLDCS =0x 0x000000;
.PLDCV =0x 0x000000;
.PLEQS =0x 0x000000;
.PLEQV =0x 0x000000;
.PLEQVL =0x 0x000000;
.PLESS =0x 0x000000;
.PLESV =0x 0x000000;
.PLESVL =0x 0x000000;
.PLODS =0x 0x000000;
.PLODV =0x 0x000000;
.PLODVL =0x 0x000000;
.PMODJ =0x 0x000000;
.PMOV =0x 0x000000;
.PMPJ =0x 0x000000;
.PNEQS =0x 0x000000;
.PNEQV =0x 0x000000;
.PNEQVL =0x 0x000000;
.PNEQW =0x 0x000000;
.PPAGE =0x 0x000000;
.PPEE =0x 0x000000;
.PPUT =0x 0x000000;
.PRDB =0x 0x000000;
.PRDC =0x 0x000000;
.PRDH =0x 0x000000;
.PRDI =0x 0x000000;
.PRDJ =0x 0x000000;
.PRDRS =0x 0x000000;
.PRDS =0x 0x000000;
.PRDV =0x 0x000000;
.PRLN =0x 0x000000;
.PRRAN =0x 0x000000;
.PRST =0x 0x000000;
.PRWT =0x 0x000000;
.PSCON =0x 0x000000;
.PSCOP =0x 0x000000;
.PSDEL =0x 0x000000;
.PSINS =0x 0x000000;
.PSLEN =0x 0x000000;
.PSPOS =0x 0x000000;
.PSTCV =0x 0x000000;
.PSTCVL =0x 0x000000;
.PSTOS =0x 0x000000;
.PSTOV =0x 0x000000;
.PSTOVL =0x 0x000000;
.PSTRS =0x 0x000000;
.PSTRV =0x 0x000000;
.PSTRVL =0x 0x000000;
.PWLN =0x 0x000000;
.PWRAN =0x 0x000000;
.PWRB =0x 0x000000;
.PWRC =0x 0x000000;
.PWRH =0x 0x000000;
.PWRI =0x 0x000000;
.PWRJ =0x 0x000000;
.PWRS =0x 0x000000;
.PWRV =0x 0x000000;
*/
/*
.P=0x = 0;
.PCHIO =0x 0xfeedfa;
.PCLO =0x 0xfeedfa;
.PCVBSV =0x 0xfeedfa;
.PCVTSU =0x 0xfeedfa;
.PCVTSV =0x 0xfeedfa;
.PCVTSVL =0x 0xfeedfa;
.PCVTUS =0x 0xfeedfa;
.PDIS =0x 0xfeedfa;
.PDISL =0x 0xfeedfa;
.PDVJ =0x 0xfeedfa;
.PEIO =0x 0xfeedfa;
.PEOF =0x 0xfeedfa;
.PEOL =0x 0xfeedfa;
.PEQUS =0x 0xfeedfa;
.PEQUV =0x 0xfeedfa;
.PEQUVL =0x 0xfeedfa;
.PEQUW =0x 0xfeedfa;
.PGCM =0x 0xfeedfa;
.PGEQS =0x 0xfeedfa;
.PGEQV =0x 0xfeedfa;
.PGEQVL =0x 0xfeedfa;
.PGET =0x 0xfeedfa;
.PGRTS =0x 0xfeedfa;
.PGRTV =0x 0xfeedfa;
.PGRTVL =0x 0xfeedfa;
.PIACT =0x 0xfeedfa;
.PIFD =0x 0xfeedfa;
.PINDS =0x 0xfeedfa;
.PINDV =0x 0xfeedfa;
.PINDVL =0x 0xfeedfa;
.PINDW =0x 0xfeedfa;
.PLDCS =0x 0xfeedfa;
.PLDCV =0x 0xfeedfa;
.PLEQS =0x 0xfeedfa;
.PLEQV =0x 0xfeedfa;
.PLEQVL =0x 0xfeedfa;
.PLESS =0x 0xfeedfa;
.PLESV =0x 0xfeedfa;
.PLESVL =0x 0xfeedfa;
.PLODS =0x 0xfeedfa;
.PLODV =0x 0xfeedfa;
.PLODVL =0x 0xfeedfa;
.PMODJ =0x 0xfeedfa;
.PMOV =0x 0xfeedfa;
.PMPJ =0x 0xfeedfa;
.PNEQS =0x 0xfeedfa;
.PNEQV =0x 0xfeedfa;
.PNEQVL = 0xfeedface;
.PNEQW = 0xfeedface;
.PPAGE = 0xfeedface;
.PPEE = 0xfeedface;
.PPUT = 0xfeedface;
.PRDB = 0xfeedface;
.PRDC = 0xfeedface;
.PRDH = 0xfeedface;
.PRDI = 0xfeedface;
.PRDJ = 0xfeedface;
.PRDRS = 0xfeedface;
.PRDS = 0xfeedface;
.PRDV = 0xfeedface;
.PRLN = 0xfeedface;
.PRRAN = 0xfeedface;
.PRST = 0xfeedface;
.PRWT = 0xfeedface;
.PSCON = 0xfeedface;
.PSCOP = 0xfeedface;
.PSDEL = 0xfeedface;
.PSINS = 0xfeedface;
.PSLEN = 0xfeedface;
.PSPOS = 0xfeedface;
.PSTCV = 0xfeedface;
.PSTCVL = 0xfeedface;
.PSTOS = 0xfeedface;
.PSTOV = 0xfeedface;
.PSTOVL = 0xfeedface;
.PSTRS = 0xfeedface;
.PSTRV = 0xfeedface;
.PSTRVL = 0xfeedface;
.PWLN = 0xfeedface;
.PWRAN = 0xfeedface;
.PWRB = 0xfeedface;
.PWRC = 0xfeedface;
.PWRH = 0xfeedface;
.PWRI = 0xfeedface;
.PWRJ = 0xfeedface;
.PWRS = 0xfeedface;
.PWRV = 0xfeedface;
*/
}

View File

@ -1,133 +0,0 @@
S00C000074312E6F75742E6F6BC0
S118000000000A205341464553544F52452041202020202052BE
S118001531332E33202020202020205231332E32202020202077
S118002A202000B5E86600B5E9B11DA15B9900001F0000000A50
S118003F640000003E0000005C00A800BA00F000040001000251
S1180054000000000000000000000006004031CF52544C4942D0
S1180069434F4E0004E5EC52544C4942434F4E0004E5ED5254F0
S118007E4C4942434F4E004031D252544C4942434F4E00000A08
S11800937D52544C49425354520010A4A852544C494246494CAD
S11800A8000200B5E86D0000016000B5E873000002540002006A
S11800BDB5E937534146455052494E5420000006000200080079
S11800D20000034200B5E86E494E4954534146455354000002C9
S11800E71800000E00000009020030000000004E56FFD8BA8FDB
S11800FC63062E4E6100001641FA003243EEFFD8702612D85149
S1180111C8FFFC4E5E4E752B57FFF22F3C0000000A6000000259
S11801263B6F0002FFF62F2D00382F2D00344E4C4E4A434F50E7
S118013B5952494748542054656C65666F6E204142204C204D6B
S1180150204572696373736F6E2C2031393933004E56FFFCBAB5
S11801658F63042E4E61AC202E000C06800000000C4E7656807C
S118017A4E760280FFFFFFFC4AD56604610000B02D40FFFC200B
S118018F6C003A2208242C003694814E7604820000000C4E76D2
S11801A44AD566046100008EB0826E0C0CAE00000001000C6CEB
S11801B900000C207C0000000061000060206C003A200866046C
S11801CE610000762208D2AEFFFC68046100005C2081216E0043
S11801E3100004216E000C0008220806810000000C68046100C2
S11801F800402D4100142950003A206C003A24086604610000BC
S118020D3A429042A8000442A800084E5E225F285F508F4EE922
S118022200022B5FFFF24E5ED1DF285F2F082B48FFF2D0D04EDA
S1180237D02B57FFF22F3C0000000E6000FEE22B57FFF22F3CD4
S118024C000000106000FED44E56FFFCBA8F63062E4E6100FE2B
S1180261B82D6C0032FFFC600000122B5FFFF24FEEFFFC42AEF1
S1180276FFFC600000824AAEFFFC6700007A206EFFFC200866A7
S118028B00000461B622280004B2AE001067000062220802810B
S11802A0000000034A8166402208226C003A2409B2826E3426B6
S11802B510280806840000000C68046100FF76B6846D2026101B
S11802CA280896844E7604830000000C4E764AD566046100FFCD
S11802DF5AB6A800086C0000046182206EFFFC20086604610077
S11802F4FF522D50FFFC60804AAEFFFC6700002C206EFFFC2019
S11803090866046100FF38226E000C22A80008220806810000B2
S118031E000C68046100FF142D4100146000000C206E000C4210
S11803339042AE00144E5E205F285F508F4ED04FEDFF00707F44
S1180348204F425851C8FFFC486DFF081F3C00043F3C00019F49
S118035DFC0000000C224F45FA04FE22DA22DA22DA266C00281F
S11803722F0C286C002C4EAB0068486DFFB8486DFFB42F0C20E7
S11803876C0000286C00044E909FFC000000522F2DFFC62F0C32
S118039C206C0008286C000C4E907052266C00204EAB001E416A
S11803B1FA04BE266C00204EAB007E266C00204EAB009E41EDD7
S11803C6FFBA266C00204EAB007E266C00204EAB009E1F3C0098
S11803DB283F3C0001266C00204EAB009E9FFC00000052302DD2
S11803F0FFCA48C02F002F0C206C0008286C000C4E90705226BF
S11804056C00204EAB001E266C00204EAB009E41FA045E266CC3
S118041A00204EAB007E266C00204EAB009E41EDFF9E70162672
S118042F6C00204EAB00CA600000162B5FFFF24FEDFF002B7C92
S118044400000001FFB4600003E4486DFF089FFC0000005220DB
S11804594F43EDFF9E3019725092406F024241D04130C06F0A23
S118046E5340E24030D951C8FFFC9FFC00000052224F45FA0303
S1180483F632DA266C00282F0C286C002C4EAB0050FFAA486D02
S1180498FF08266C00282F0C286C002C4EAB00A0FF9642ADFF73
S11804AD002B6C0032FF04487A03C43F3CFFFF486DFF08266C1A
S11804C200282F0C286C002C4EAB00C0FF70486DFF08266C0088
S11804D7282F0C286C002C4EAB00A4FF5C600000782B5FFFF29E
S11804EC4FEDFF00487A03BA3F3CFFFF486DFF08266C00282F1F
S11805010C286C002C4EAB00C0FF349FFC00000052206DFF04AC
S118051620082F002F0C206C0010286C00144E902F0F3F3CFF60
S118052BFF486DFF08266C00282F0C286C002C4EAB00C0FF008F
S1180540DFFC00000052486DFF08266C00282F0C286C002C4EB6
S1180555AB00A4FEE6600001F0206DFF042008660261804A902E
S118056A6700016A22100281000000034A81664A2210242C00F1
S118057F3604820000000C68046100FCAEB2826E3422102408F0
S118059406820000000C68046100FC9AB2826D202210240892A6
S11805A9824E7604810000000C4E764AD566046100FC7EB2A8E0
S11805BE00086C0000066100FF22206DFF04200866046100FFA6
S11805D31622280008D2ADFF0068046100FC582B41FF009FFC02
S11805E80000005224082F022F0C206C0010286C00144E902FBF
S11805FD0F3F3C000C486DFF08266C00282F0C286C002C4EABE5
S118061200C0FE2ADFFC00000052206DFF04200866046100FE39
S1180627C22F2800043F3C000C486DFF08266C00282F0C286CD1
S118063C002C4EAB00BCFDFC206DFF04200866046100FE9A2F81
S11806512800083F3C000C486DFF08266C00282F0C286C002C68
S11806664EAB00BCFDD49FFC00000052206DFF04200866046185
S118067B00FE6C22102F012F0C206C0010286C00144E902F0FFF
S11806903F3C000C486DFF08266C00282F0C286C002C4EAB0060
S11806A5C0FD98DFFC00000052486DFF08266C00282F0C286C75
S11806BA002C4EAB00A4FD7E206DFF04200866046100FE1C2B1B
S11806CF50FF046000FE8A206C003AB1EDFF046700006C487ADB
S11806E401E83F3CFFFF486DFF08266C00282F0C286C002C4EDC
S11806F9AB00C0FD429FFC00000052206DFF0420082F002F0C2F
S118070E206C0010286C00144E902F0F3F3CFFFF486DFF082617
S11807236C00282F0C286C002C4EAB00C0FD0EDFFC000000523D
S1180738486DFF08266C00282F0C286C002C4EAB00A4FCF44862
S118074D7A01983F3CFFFF486DFF08266C00282F0C286C002C96
S11807624EAB00C0FCD8486DFF08266C00282F0C286C002C4E32
S1180777AB00A4FCC4487A016A3F3CFFFF486DFF08266C00283E
S118078C2F0C286C002C4EAB00C0FCA8486DFF08266C00282F57
S11807A10C286C002C4EAB00A4FC94206DFF0420080680000008
S11807B600184E76222C003692804E760281FFFFFFFC4AD566F3
S11807CB046100FA6A2F013F3C000C486DFF08266C00282F0CE4
S11807E0286C002C4EAB00BCFC562F2DFF003F3C000C486DFFA3
S11807F508266C00282F0C286C002C4EAB00BCFC3A486DFF0887
S118080A266C00282F0C286C002C4EAB00A4FC26486DFF081F86
S118081F3C0001266C00282F0C286C002C4EAB0054486DFFB815
S1180834486DFFB42F0C206C0018286C001C4E90486DFF0842D8
S118084927266C00282F0C286C002C4EAB005442A72F2D0038F0
S118085E2F2D00344E4A000A4631202020202020202000023A9C
S11808733A0002293A0000003020202020204164647265737337
S1180888202020204964656E746974792020202020202020533A
S118089D697A6520202020202020204E657874001D496E7661B0
S11808B26C6964207365676D656E74207374617274696E672035
S11808C761743A202000185365676D656E74206C69737420637F
S11808DC6F727275707465643A2000000018202020417661693B
S11808F16C61626C652020202020202020557365644FEDFFF230
S11809069FFC0000000A6100015641EC003020DF20DF30DF20F1
S118091B2C003256804E760280FFFFFFFC4AD566046100F90A63
S1180930294000322940003A6000003E2B5FFFF24FEDFFF2200A
S11809452C003256804E760280FFFFFFFC4AD566046100F8E064
S118095A2940003A206C003A220866046100F8DE429042A80094
S118096F0442A800086000009E4A2C00306700001A206C003A8E
S11809842008660261B2429042A8000442A800086000007E2007
S11809996C003A20086602619A4A906700006E221002810000B0
S11809AE00034A81664A2210242C003604820000000C6804619B
S11809C300F874B2826E342210240806820000000C680461001A
S11809D8F860B2826D202210240892824E7604810000000C4ED8
S11809ED764AD566046100F844B2A800086C0000066100FF3CE5
S1180A02206C003A200866046100FF302950003A608442A72F44
S1180A172D00382F2D00344E4A4E560000518F42A71F3C000E63
S1180A2C4267487A0012426742272F3C00B5E86E4E49000E50B7
S1180A418F4E5E205F285F4EE80002207C0000000060042B5F99
S1180A56FFF24E5ED1DF285F2F08D0D04ED043FA0004D3FC00AE
S1180A6B02704E2F49000A43FA0004D3FC000000402F49000662
S1180A8041FA0004D1FCFFFFF57A202800566600002222099201
S1180A95882141005642812448D25AB5C96DFA4441D368005AAE
S1110AAA1F7C000100044E75422F00044E759F
S9030000FC

Some files were not shown because too many files have changed in this diff Show More