home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / src / amiga / binutils-2.5.2-src.lha / binutils-2.5.2 / ld / testsuite / ld-scripts / defined.exp next >
Encoding:
Text File  |  1994-09-29  |  691 b   |  30 lines

  1. # Test DEFINED in a linker script.
  2. # By Ian Lance Taylor, Cygnus Support.
  3.  
  4. if ![ld_assemble $as $srcdir$subdir/defined.s tmpdir/def.o] { return }
  5.  
  6. set prms_id 5699
  7.  
  8. if ![ld_simple_link $ld tmpdir/def "-T $srcdir$subdir/defined.t tmpdir/def.o"] {
  9.     fail DEFINED
  10. } else {
  11.     if [ld_nm $nm tmpdir/def] {
  12.     if {![info exists nm_output(value1)] \
  13.          || ![info exists nm_output(value2)]} {
  14.         fail "DEFINED (bad output from $nm)"
  15.     } else {
  16.         if {$nm_output(value1) != 1} {
  17.         fail "DEFINED (value1 == $nm_output(value1))"
  18.         } else {
  19.         if {$nm_output(value2) != 2} {
  20.             fail "DEFINED (value2 == $nm_output(value2))"
  21.         } else {
  22.             pass DEFINED
  23.         }
  24.         }
  25.     }
  26.     }
  27. }
  28.  
  29. set prms_id 0
  30.