Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

Location:
branches/GNU/src/binutils/ld/testsuite
Files:
49 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/ld/testsuite/ChangeLog

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 2001-06-11  Alan Modra  <amodra@bigpond.net.au>
    2 
    3         Merge from mainline.
    4         2001-06-06  H.J. Lu  <hjl@gnu.org>
     12003-06-10  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
     2
     3        * ld-mips-elf/rel32-n32.d: Force big endian assembly.
     4        * ld-mips-elf/rel32-o32.d: Likewise.
     5        * ld-mips-elf/rel64.d: Likewise.
     6
     72003-05-20  Jakub Jelinek  <jakub@redhat.com>
     8
     9        * ld-elfvsb/common.c: New file.
     10        * ld-elfvsb/elfvsb.exp: Add common.
     11
     122003-05-20  H.J. Lu <hongjiu.lu@intel.com>
     13
     14        * ld-elfvsb/sh3.c: New file.
     15        * ld-elfvsb/test.c: Likewise.
     16
     17        * ld-elfvsb/elfvsb.exp: Add new weak hidden symbol tests.
     18
     192003-05-15  Daniel Jacobowitz  <drow@mvista.com>
     20
     21        Merge from mainline:
     22
     23        2003-05-13  H.J. Lu <hongjiu.lu@intel.com>
     24        * ld-elfweak/elfweak.exp: Fix typo.
     25
     26        2003-05-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
     27        * ld-elfvers/vers.exp: Run on sh[34]*-*-linux*.
     28        * ld-elfvsb/elfvsb.exp: Likewise.
     29        * ld-elfweak/elfweak.exp: Likewise.
     30
     31        2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
     32        * ld-elfvsb/elf-offset.ld: Add .rel.eh_frame and .rela.eh_frame
     33        to linker script.
     34        * ld-elfvsb/elfvsb.exp (visibility_run): Add setup_xfails for s390x.
     35        * ld-selective/selective.exp: Disable for s390 and s390x.
     36        * ld-shared/elf-offset.ld: Add .rel.eh_frame and .rela.eh_frame
     37        to linker script.
     38        * ld-shared/shared.exp (shared_test): Add setup_xfails for s390x.
     39        * ld-undefined/undefined.exp (checkund): Remove setup_xfail for s390x.
     40
     41        2003-05-08  H.J. Lu <hongjiu.lu@intel.com>
     42        * ld-elfvers/vers.exp: Add vers27d4 and vers27d5 to test
     43        versioned reference for hidden symbol.
     44
     45        * ld-elfvers/vers27d4.dsym: New file.
     46        * ld-elfvers/vers27d4.ver: Likewise.
     47
     48        2003-05-07  H.J. Lu <hongjiu.lu@intel.com>
     49        * ld-elfvers/vers27d3.c (__start): New.
     50        (start): New.
     51
     52        2003-05-07  H.J. Lu <hongjiu.lu@intel.com>
     53        * ld-elfvers/vers.exp (build_binary): Support build exeutable.
     54        (build_binary): Renamed from ...
     55        (build_vers_lib): This.
     56        (build_vers_lib_no_pic): Updated.
     57        (build_vers_lib_pic): Likewise.
     58        Add vers27d1, vers27d2 and vers27d3 to test versioned
     59        definition for hidden symbol referenced by a DSO.
     60
     61        * ld-elfvers/vers27d.dsym: New file.
     62        * ld-elfvers/vers27d.sym: Likewise.
     63        * ld-elfvers/vers27d.ver: Likewise.
     64        * ld-elfvers/vers27d1.c: Likewise.
     65        * ld-elfvers/vers27d2.c: Likewise.
     66        * ld-elfvers/vers27d3.c: Likewise.
     67
     68        2003-05-07  Andreas Schwab  <schwab@suse.de>
     69        * ld-elfvsb/elfvsb.exp: Run dump tests even when cross
     70        compiling.
     71
     72        2003-05-06  Alexandre Oliva  <aoliva@redhat.com>
     73        * config/default.exp (gcc_gas_flags): Force ABI to n32 on
     74        mips64-linux.
     75        * ld-elf/merge.d: Xfail on mips64*-linux-gnu*.
     76        * ld-mips-elf/mips-elf-flags.exp (ldemul): Set to o32-compatible
     77        on mips-sgi-irix6*, mips64-linux-gnu and mips64el-linux-gnu.
     78        (good_combination, bad_combination): Use it.
     79        Add -32 or -mabi=o64 wherever the ABI was formerly implied.
     80
     81        2003-05-06  H.J. Lu <hjl@gnu.org>
     82        * ld-elfvers/vers.exp (objdump_versionstuff): Support comment
     83        in expected version file.
     84
     85        * ld-elfvers/vers25b.c: Add a line of comment.
     86        * ld-elfvers/vers25b.dsym: Likwise.
     87        * ld-elfvers/vers25b.ver: Likwise.
     88        * ld-elfvers/vers26b.dsym: Likwise.
     89        * ld-elfvers/vers26b.ver: Likwise.
     90        * ld-elfvers/vers27b.dsym: Likwise.
     91        * ld-elfvers/vers27b.ver: Likwise.
     92        * ld-elfvers/vers27c.c: Likwise.
     93        * ld-elfvers/vers27c.dsym: Likwise.
     94        * ld-elfvers/vers27c.ver: Likwise.
     95
     962003-05-13  Stephane Carrez  <stcarrez@nerim.fr>
     97
     98        * ld-m68hc11/link-hcs12.d: New test.
     99        * ld-m68hc11/link-hcs12.s: New file.
     100        * ld-m68hc11/link-hc12.s: New file.
     101
     1022003-05-12  Hans-Peter Nilsson  <hp@bitrange.com>
     103
     104        * ld-mmix/b-fixo2.d, ld-mmix/bpo-18.d, ld-mmix/bpo-18m.d,
     105        ld-mmix/loc4.d, ld-mmix/loc4m.d, ld-mmix/loc6.d, ld-mmix/loc6m.d,
     106        ld-mmix/locdo-1.d, ld-mmix/sec-1.d, ld-mmix/sec-2.d,
     107        ld-mmix/sec-3.d, ld-mmix/sec-4.d, ld-mmix/sec-5.d,
     108        ld-mmix/sec-7m.d, ld-mmix/sec-8m.d, ld-mmix/spec802.d,
     109        ld-mmix/spec803.d, ld-mmix/spec804.d, ld-mmix/spec805.d,
     110        ld-mmix/spec806.d, ld-mmix/spec807.d, ld-mmix/spec808.d: Tweak for
     111        objdump no longer truncating dump addresses.
     112
     1132003-05-05  Daniel Jacobowitz  <drow@mvista.com>
     114
     115        Merge from mainline:
     116        2003-05-04  H.J. Lu <hjl@gnu.org>
     117        * ld-elfvers/vers18.dsym: Updated for weak definiton change.
     118        * ld-elfvers/vers18.ver: Likewise.
     119        * ld-elfvers/vers19.ver: Likewise.
     120        * ld-elfweak/dsowdata.dsym: Likewise.
     121        * ld-elfweak/elfweak.exp: Likewise.
     122        * ld-elfweak/weakdata.dsym: Likewise.
     123
     124        * ld-elfweak/elfweak.exp: Remove xfail.
     125
     126        2003-05-03  H.J. Lu <hjl@gnu.org>
     127        * ld-elfvers/vers.exp: Add vers27a, vers27b, vers27c1 and
     128        vers27c2 to test versioned definition vs. hidden definition in
     129        different files.
     130
     131        * ld-elfvers/vers27a.c: New file.
     132        * ld-elfvers/vers27a.dsym: Likewise.
     133        * ld-elfvers/vers27a.map: Likewise.
     134        * ld-elfvers/vers27a.ver: Likewise.
     135        * ld-elfvers/vers27b.c: Likewise.
     136
     137        * ld-elfvers/vers27b.dsym: New empty file.
     138        * ld-elfvers/vers27b.ver: Likwise.
     139        * ld-elfvers/vers27c.c: Likwise.
     140        * ld-elfvers/vers27c.dsym: Likwise.
     141        * ld-elfvers/vers27c.ver: Likwise.
     142
     143        2003-05-02  Andreas Jaeger  <aj@suse.de>
     144        * ld-elfvers/vers.exp (build_exec): Disable vers26b3 on x86-64-linux.
     145
     1462003-05-04  Alexandre Oliva  <aoliva@redhat.com>
     147
     148        * ld-mips-elf/multi-got-1.d: Force into big-endian mode.
     149        Turn relocation offsets into regexps.
     150
     1512003-05-03  Daniel Jacobowitz  <drow@mvista.com>
     152
     153        Merge from mainline:
     154        2003-04-28  H.J. Lu <hjl@gnu.org>
     155        * ld-elfvers/vers.exp (picflag): Set PIC flag for compiler.
     156        (build_vers_lib): Support PIC.
     157        (build_vers_lib_no_pic): New. Change all calls to build_vers_lib
     158        to build_vers_lib_no_pic.
     159        (build_vers_lib_pic): New.
     160        Add tests vers26a, vers26b1, vers26b2 and vers26b3 for versioned
     161        definition vs. normal definition in different files.
     162
     163        * ld-elfvers/vers26a.c: New file.
     164        * ld-elfvers/vers26a.dsym: Likewise.
     165        * ld-elfvers/vers26a.map: Likewise.
     166        * ld-elfvers/vers26a.ver: Likewise.
     167        * ld-elfvers/vers26b.c: Likewise.
     168
     169        * ld-elfvers/vers26b.dsym: New empty file.
     170        * ld-elfvers/vers26b.ver: Likewise.
     171
     172        2003-04-27  H.J. Lu <hjl@gnu.org>
     173        * ld-elfvsb/elfvsb.dat: Updated.
     174        * ld-elfvsb/elfvsb.exp: Likewise.
     175        * ld-elfvsb/main.c: Likewise.
     176        * ld-elfvsb/sh1.c: Likewise.
     177        * ld-elfvsb/sh2.c: Likewise.
     178
     1792003-04-29  J"orn Rennecke <joern.rennecke@superh.com>
     180
     181        * ld-selective/3.cc (start): New function.
     182        * ld-selective/4.cc: Likewise.
     183        * ld-selective/5.cc: Likewise.
     184
     1852003-04-26  Stephane Carrez  <stcarrez@nerim.fr>
     186
     187        * ld-m68hc11/bug-3331.d: New test.
     188        * ld-m68hc11/bug-3331.s: New file.
     189
     1902003-04-25  Nick Clifton <nickc@redhat.com>
     191            J"orn Rennecke <joern.rennecke@superh.com>
     192
     193        * lib/ld-lib.exp (big_or_little_endian): Also check for -mb and -ml.
     194
     1952003-04-24  J"orn Rennecke <joern.rennecke@superh.com>
     196
     197        * ld-elfcomm/elfcomm.exp: Allow symbols to have '_' prepended.
     198
     1992003-04-23  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
     200
     201        * ld-sh/tlsbin-1.d, ld-sh/tlsbin-2.d, ld-sh/tlsbin-3.d,
     202        ld-sh/tlstpoff-1.d, ld-sh/tlstpoff-2.d: Update for removing
     203        unnecessary TLS relocs.
     204
     2052003-04-23  J"orn Rennecke <joern.rennecke@superh.com>
     206
     207        * ld-sh/sh64/crange3-cmpct.rd (Machine): Change to refer to SuperH.
     208        * ld-sh/sh64/crange3-media.rd (Machine): Likewise.
     209
     2102003-04-23  H.J. Lu <hjl@gnu.org>
     211
     212        * ld-elfvers/vers.exp (objdump_dynsymstuff): Support empty
     213        files.
     214        (objdump_versionstuff): Likewise.
     215        Add tests vers25a, vers25b1 and vers25b2 for versioned
     216        definition vs. normal definition in different files.
     217
     218        * ld-elfvers/vers25a.c: New file.
     219        * ld-elfvers/vers25a.dsym: Likewise.
     220        * ld-elfvers/vers25a.map: Likewise.
     221        * ld-elfvers/vers25a.ver: Likewise.
     222
     223        * ld-elfvers/vers25b.c: New empty file.
     224        * ld-elfvers/vers25b.dsym: Likewise.
     225        * ld-elfvers/vers25b.ver: Likewise.
     226
     2272003-04-22  H.J. Lu <hjl@gnu.org>
     228
     229        * ld-elfcomm/elfcomm.exp: Support 64bit targets.
     230
     2312003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
     232
     233        * ld-m68hc11/far-hc11.s: New file.
     234        * ld-m68hc11/far-hc11.d: New test for HC11 trampoline generation.
     235        * ld-m68hc11/far-hc12.s: New file.
     236        * ld-m68hc11/far-hc12.d: New test for HC12 trampoline generation.
     237        * ld-m68hc11/far-hc12.ld: New file.
     238
     2392003-04-15  H.J. Lu <hjl@gnu.org>
     240
     241        * ld-elfcom/elfcom.exp: Fix a typo.
     242
     2432003-04-14  H.J. Lu <hjl@gnu.org>
     244
     245        * ld-elfcom: New directory.
     246        * ld-elfcom/elfcom.exp: New file: Test alignment of common symbols
     247        under ELF.
     248        * ld-elfcom/common1a.c: New file: Test source code.
     249        * ld-elfcom/common1b.c: New file: Test source code.
     250
     2512003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
     252
     253        * ld-sh/sh64/crange3-cmpct.rd: Replace occurrances of 'Hitachi'
     254        with 'Renesas'.
     255        * ld-sh/sh64/crange3-media.rd: Likewise.
     256
     2572002-04-13  Daniel Jacobowitz  <drow@mvista.com>
     258
     259        * ld-discard/extern.s, ld-discard/start.s, ld-discard/static.s,
     260        ld-sh/refdbg.s: Add leading 0 to .debug_info to prevent parsing it
     261        for error messages.
     262
     2632003-04-10  Alexandre Oliva  <aoliva@redhat.com>
     264
     265        * ld-mips-elf/elf-rel-got-n32.d,
     266        ld-mips-elf/elf-rel-got-n64.d, ld-mips-elf/elf-rel-xgot-n32.d,
     267        ld-mips-elf/elf-rel-xgot-n64.d: New.
     268        * ld-mips-elf/mips-elf.exp (hasn32): Define as condition for
     269        new tests to run.
     270
     2712003-04-04  Stephane Carrez  <stcarrez@nerim.fr>
     272
     273        * ld-m68hc11/bug-1417.d: Update to take into account jsr->bsr relax.
     274
     2752003-04-02  Bob Wilson  <bob.wilson@acm.org>
     276
     277        * ld-xtensa/coalesce.exp: Skip if target is not xtensa-*-*.
     278        * ld-xtensa/lcall.exp: Likewise.
     279
     2802003-04-01  Bob Wilson  <bob.wilson@acm.org>
     281
     282        * ld-elf/merge.d: xfail xtensa-*-*.
     283        * ld-scripts/crossref.exp: Add -mtext-section-literals to CFLAGS
     284        for Xtensa targets.
     285        * ld-srec/srec.exp: Add -no-relax flag for Xtensa targets.
     286        * ld-xtensa/coalesce1.s: New file.
     287        * ld-xtensa/coalesce2.s: Likewise.
     288        * ld-xtensa/coalesce.exp: Likewise.
     289        * ld-xtensa/coalesce.t: Likewise.
     290        * ld-xtensa/lcall1.s: Likewise.
     291        * ld-xtensa/lcall2.s: Likewise.
     292        * ld-xtensa/lcall.exp: Likewise.
     293        * ld-xtensa/lcall.t: Likewise.
     294
     2952003-03-25  Alexandre Oliva  <aoliva@redhat.com>
     296
     297        * ld-mips-elf/mips-elf.exp: Added...
     298        * ld-mips-elf/relax-jalr.s, ld-mips-elf/relax-jalr-n32.d,
     299        ld-mips-elf/relax-jalr-n32-shared.d, ld-mips-elf/relax-jalr-n64.d,
     300        ld-mips-elf/relax-jalr-n64-shared.d: New tests.
     301
     3022003-03-11  Alexandre Oliva  <aoliva@redhat.com>
     303
     304        * ld-mips-elf/mips-elf.exp (linux_gnu): New variable.  Add:
     305        * ld-mips-elf/rel32-o32.d, ld-mips-elf/rel32-n32.d,
     306        ld-mips-elf/rel64.d, ld-mips-elf/rel32.s, ld-mips-elf/rel64.s: New
     307        tests.
     308
     3092003-03-11  Alan Modra  <amodra@bigpond.net.au>
     310
     311        * ld-powerpc/tlsso.r: Adjust for corrected zero symbol index relocs.
     312        * ld-powerpc/tlsso32.r: Likewise.
     313
     3142003-02-18  Alan Modra  <amodra@bigpond.net.au>
     315
     316        * ld-powerpc/tlsexe.d: Update for changed handling of invalid LD
     317        relocs.
     318        * ld-powerpc/tlsexe.g: Likewise.
     319        * ld-powerpc/tlsexe.r: Likewise.
     320        * ld-powerpc/tlsexe.t: Likewise.
     321
     322        * ld-powerpc/tls32.s: New file.
     323        * ld-powerpc/tlslib32.s: New file.
     324        * ld-powerpc/tls32.d: New file.
     325        * ld-powerpc/tls32.g: New file.
     326        * ld-powerpc/tls32.t: New file.
     327        * ld-powerpc/tlsexe32.d: New file.
     328        * ld-powerpc/tlsexe32.g: New file.
     329        * ld-powerpc/tlsexe32.r: New file.
     330        * ld-powerpc/tlsexe32.t: New file.
     331        * ld-powerpc/tlsso32.d: New file.
     332        * ld-powerpc/tlsso32.g: New file.
     333        * ld-powerpc/tlsso32.r: New file.
     334        * ld-powerpc/tlsso32.t: New file.
     335        * ld-powerpc/powerpc.exp: Run new tests.
     336
     3372003-02-18  Alan Modra  <amodra@bigpond.net.au>
     338
     339        * ld-powerpc/tlsexe.g: Update for 2003-02-14 elf64-ppc.c change.
     340
     3412003-02-10  Jakub Jelinek  <jakub@redhat.com>
     342
     343        * ld-shared/shared.exp: Run on s390*-*-linux* and x86_64-*-linux* too.
     344        xfail tests linking non-pic code into shared libs on x86_64-*-linux*.
     345        * ld-elfvsb/elfvsb.exp: Likewise.
     346        * ld-elfvers/vers.exp: Likewise.  Add vers24a, vers24b and vers24c
     347        tests.
     348        * ld-elfvers/vers3.ver: Allow VERS_2.0 to come before GLIBC_*
     349        version.
     350        * ld-elfvers/vers19.ver: Likewise.
     351        * ld-elfvers/vers24a.c: New test.
     352        * ld-elfvers/vers24b.c: New test.
     353        * ld-elfvers/vers24c.c: New test.
     354        * ld-elfvers/vers24.map: New test.
     355        * ld-elfvers/vers24.rd: New test.
     356        * lib/ld-lib.exp (run_ld_link_tests): Add optional 7th argument
     357        cflags.  If source files have .c extension, compile them first.
     358
     3592003-02-10  Kaz kojima  <kkojima@rr.iij4u.or.jp>
     360
     361        * ld-sh/tlstpoff-1.d: New.
     362        * ld-sh/tlstpoff-2.d: New.
     363        * ld-sh/tlstpoff1.s: New.
     364        * ld-sh/tlstpoff2.s: New.
     365
     3662003-02-09  Alan Modra  <amodra@bigpond.net.au>
     367
     368        * ld-powerpc/tlslib.s: Give .__tls_get_addr function type.
     369        * ld-powerpc/tlsexe.d: Update for changed handling of (invalid) ld var
     370        in dynamic lib.
     371        * ld-powerpc/tlsexe.g: Likewise.
     372        * ld-powerpc/tlsexe.r: Likewise.
     373        * ld-powerpc/tlsexe.t: Likewise.
     374        * ld-powerpc/tlsexetoc.d: Likewise.
     375        * ld-powerpc/tlsexetoc.g: Likewise.
     376        * ld-powerpc/tlsexetoc.r: Likewise.
     377        * ld-powerpc/tlsexetoc.t: Likewise.
     378
     3792003-02-05  Alan Modra  <amodra@bigpond.net.au>
     380
     381        * ld-powerpc/powerpc.exp (supports_ppc64): New.
     382        (ppcelftests): Force 32 bit mode.
     383        (ppc64elftests): New.
     384        * ld-powerpc/tls.d: New.
     385        * ld-powerpc/tls.g: New.
     386        * ld-powerpc/tls.s: New.
     387        * ld-powerpc/tls.t: New.
     388        * ld-powerpc/tlsexe.d: New.
     389        * ld-powerpc/tlsexe.g: New.
     390        * ld-powerpc/tlsexe.r: New.
     391        * ld-powerpc/tlsexe.t: New.
     392        * ld-powerpc/tlsexetoc.d: New.
     393        * ld-powerpc/tlsexetoc.g: New.
     394        * ld-powerpc/tlsexetoc.r: New.
     395        * ld-powerpc/tlsexetoc.t: New.
     396        * ld-powerpc/tlslib.s: New.
     397        * ld-powerpc/tlsso.d: New.
     398        * ld-powerpc/tlsso.g: New.
     399        * ld-powerpc/tlsso.r: New.
     400        * ld-powerpc/tlsso.t: New.
     401        * ld-powerpc/tlstoc.d: New.
     402        * ld-powerpc/tlstoc.g: New.
     403        * ld-powerpc/tlstoc.s: New.
     404        * ld-powerpc/tlstoc.t: New.
     405        * ld-powerpc/tlstocso.d: New.
     406        * ld-powerpc/tlstocso.g: New.
     407        * ld-powerpc/tlstocso.r: New.
     408        * ld-powerpc/tlstocso.t: New.
     409
     4102003-01-27  Alexandre Oliva  <aoliva@redhat.com>
     411
     412        * ld-mips-elf/multi-got-1.d: New.
     413        * ld-mips-elf/multi-got-1-1.s: New.
     414        * ld-mips-elf/multi-got-1-2.s: New.
     415        * ld-mips-elf/mips-elf.exp (elf): mips*-*-irix* is elf.
     416        Run multi-got-1.
     417
     4182003-01-25  Jakub Jelinek  <jakub@redhat.com>
     419
     420        * ld-sparc/sparc.exp: New.
     421        * ld-sparc/tlsg32.s: New test.
     422        * ld-sparc/tlsg32.sd: Likewise.
     423        * ld-sparc/tlsg64.s: Likewise.
     424        * ld-sparc/tlsg64.sd: Likewise.
     425        * ld-sparc/tlslib.s: Likewise.
     426        * ld-sparc/tlsnopic.s: Likewise.
     427        * ld-sparc/tlspic.s: Likewise.
     428        * ld-sparc/tlssunbin32.dd: Likewise.
     429        * ld-sparc/tlssunbin32.rd: Likewise.
     430        * ld-sparc/tlssunbin32.s: Likewise.
     431        * ld-sparc/tlssunbin32.sd: Likewise.
     432        * ld-sparc/tlssunbin32.td: Likewise.
     433        * ld-sparc/tlssunbin64.dd: Likewise.
     434        * ld-sparc/tlssunbin64.rd: Likewise.
     435        * ld-sparc/tlssunbin64.s: Likewise.
     436        * ld-sparc/tlssunbin64.sd: Likewise.
     437        * ld-sparc/tlssunbin64.td: Likewise.
     438        * ld-sparc/tlssunbinpic32.s: Likewise.
     439        * ld-sparc/tlssunbinpic64.s: Likewise.
     440        * ld-sparc/tlssunnopic32.dd: Likewise.
     441        * ld-sparc/tlssunnopic32.rd: Likewise.
     442        * ld-sparc/tlssunnopic32.s: Likewise.
     443        * ld-sparc/tlssunnopic32.sd: Likewise.
     444        * ld-sparc/tlssunnopic64.dd: Likewise.
     445        * ld-sparc/tlssunnopic64.rd: Likewise.
     446        * ld-sparc/tlssunnopic64.s: Likewise.
     447        * ld-sparc/tlssunnopic64.sd: Likewise.
     448        * ld-sparc/tlssunpic32.dd: Likewise.
     449        * ld-sparc/tlssunpic32.rd: Likewise.
     450        * ld-sparc/tlssunpic32.s: Likewise.
     451        * ld-sparc/tlssunpic32.sd: Likewise.
     452        * ld-sparc/tlssunpic32.td: Likewise.
     453        * ld-sparc/tlssunpic64.dd: Likewise.
     454        * ld-sparc/tlssunpic64.rd: Likewise.
     455        * ld-sparc/tlssunpic64.s: Likewise.
     456        * ld-sparc/tlssunpic64.sd: Likewise.
     457        * ld-sparc/tlssunpic64.td: Likewise.
     458
     4592003-01-24  Martin Schwidefsky  <schwidefsky@de.ibm.com>
     460
     461        * ld-s390/s390.exp: New file.
     462        * ld-s390/tlsbin_64.dd: New file.
     463        * ld-s390/tlsbin_64.rd: New file.
     464        * ld-s390/tlsbin_64.s: New file.
     465        * ld-s390/tlsbin_64.sd: New file.
     466        * ld-s390/tlsbin_64.td: New file.
     467        * ld-s390/tlsbin.dd: New file.
     468        * ld-s390/tlsbinpic_64.s: New file.
     469        * ld-s390/tlsbinpic.s: New file.
     470        * ld-s390/tlsbin.rd: New file.
     471        * ld-s390/tlsbin.s: New file.
     472        * ld-s390/tlsbin.sd: New file.
     473        * ld-s390/tlsbin.td: New file.
     474        * ld-s390/tlslib_64.s: New file.
     475        * ld-s390/tlslib.s: New file.
     476        * ld-s390/tlspic1_64.s: New file.
     477        * ld-s390/tlspic1.s: New file.
     478        * ld-s390/tlspic2_64.s: New file.
     479        * ld-s390/tlspic2.s: New file.
     480        * ld-s390/tlspic_64.dd: New file.
     481        * ld-s390/tlspic_64.rd: New file.
     482        * ld-s390/tlspic_64.sd: New file.
     483        * ld-s390/tlspic_64.td: New file.
     484        * ld-s390/tlspic.dd: New file.
     485        * ld-s390/tlspic.rd: New file.
     486        * ld-s390/tlspic.sd: New file.
     487        * ld-s390/tlspic.td: New file.
     488
     4892003-01-24  Alan Modra  <amodra@bigpond.net.au>
     490
     491        * ld-alpha/tlsbin.sd: Cope with truncated address in data dumps.
     492        * ld-alpha/tlsbin.td: Likewise.
     493        * ld-alpha/tlsbinr.sd: Likewise.
     494
     4952003-01-21  Richard Henderson  <rth@redhat.com>
     496
     497        * ld-alpha/alpha.exp: New.
     498        * ld-alpha/align.s: New.
     499        * ld-alpha/tlsbin.dd: New.
     500        * ld-alpha/tlsbin.rd: New.
     501        * ld-alpha/tlsbin.s: New.
     502        * ld-alpha/tlsbin.sd: New.
     503        * ld-alpha/tlsbin.td: New.
     504        * ld-alpha/tlsbinpic.s: New.
     505        * ld-alpha/tlsbinr.dd: New.
     506        * ld-alpha/tlsbinr.rd: New.
     507        * ld-alpha/tlsbinr.sd: New.
     508        * ld-alpha/tlsg.s: New.
     509        * ld-alpha/tlsg.sd: New.
     510        * ld-alpha/tlslib.s: New.
     511        * ld-alpha/tlspic.dd: New.
     512        * ld-alpha/tlspic.rd: New.
     513        * ld-alpha/tlspic.sd: New.
     514        * ld-alpha/tlspic.td: New.
     515        * ld-alpha/tlspic1.s: New.
     516        * ld-alpha/tlspic2.s: New.
     517
     5182003-01-20  Alan Modra  <amodra@bigpond.net.au>
     519
     520        * ld-srec/srec.exp (run_srec_test): Pass --traditional-format to ld.
     521
     5222003-01-18  Jakub Jelinek  <jakub@redhat.com>
     523
     524        * ld-ia64/tlspic1.s: Add tests for IE in shared libraries.
     525        * ld-ia64/tlspic.rd: Adjust.
     526        * ld-ia64/tlspic.dd: Adjust.
     527        * ld-ia64/tlspic.sd: Adjust.
     528
     5292003-01-16  Jakub Jelinek  <jakub@redhat.com>
     530
     531        * ld-ia64/ia64.exp: New.
     532        * ld-ia64/tlsbin.dd: New test.
     533        * ld-ia64/tlsbinpic.s: New test.
     534        * ld-ia64/tlsbin.rd: New test.
     535        * ld-ia64/tlsbin.s: New test.
     536        * ld-ia64/tlsbin.sd: New test.
     537        * ld-ia64/tlsbin.td: New test.
     538        * ld-ia64/tlsg.s: New test.
     539        * ld-ia64/tlsg.sd: New test.
     540        * ld-ia64/tlslib.s: New test.
     541        * ld-ia64/tlspic1.s: New test.
     542        * ld-ia64/tlspic2.s: New test.
     543        * ld-ia64/tlspic.dd: New test.
     544        * ld-ia64/tlspic.rd: New test.
     545        * ld-ia64/tlspic.sd: New test.
     546        * ld-ia64/tlspic.td: New test.
     547
     5482003-01-02  Richard Sandiford  <rsandifo@redhat.com>
     549
     550        * ld-mips-elf/mips-elf-flags.exp: Add -mips4 to a -mgp64 test.
     551
     5522003-01-02  Richard Sandiford  <rsandifo@redhat.com>
     553
     554        * ld-mips-elf/jr.s: New file.
     555        * ld-mips-elf/mips-elf-flags.exp: New test.
     556
     5572002-12-18  Ralf Habacker  <ralf.habacker@freenet.de>
     558
     559        * ld-auto-import: New directory.
     560        * ld-auto-import/auto-import.exp: Test the auto importing direct
     561        from a dll functionality.
     562        * ld-auto-import/client.c: Source code for test.
     563        * ld-auto-import/dll.c: Likewise.
     564
     5652002-12-12  Alexandre Oliva  <aoliva@redhat.com>
     566
     567        * ld-mips-elf/mips-elf.exp: Remove branch-misc-2 test.
     568        * ld-mips-elf/branch-misc-2.d: Removed.
     569
     5702002-12-10  Jason Thorpe  <thorpej@wasabisystems.com>
     571
     572        * lib/ld-lib.exp (is_elf_format): Match NetBSD ELF targets.
     573
     5742002-12-03  Nick Clifton  <nickc@redhat.com>
     575
     576        * ld-powerpc/powerpc.exp (ppcelftests): Add apuinfo merging
     577        test.
     578        * ld-powerpc/apuinfo1.s: New assembler source file.
     579        * ld-powerpc/apuinfo2.s: New assembler source file.
     580        * ld-powerpc/apuinfo.rd: New expected output file.
     581
     5822002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
     583
     584        Fix PR savannah/1417:
     585        * ld-m68hc11/bug-1417.s: New test.
     586        * ld-m68hc11/bug-1417.d: Likewise.
     587
     5882002-11-28  Jakub Jelinek  <jakub@redhat.com>
     589
     590        * ld-i386/tlsnopic.rd: Change NOTYPE to TLS for UND sg* symbols.
     591
     5922002-11-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
     593
     594        * ld-sh/refdbg-0-dso.d: New test.
     595        * ld-sh/refdbg-1.d: Likewise.
     596        * ld-sh/refdbg.s: Likewise.
     597        * ld-sh/refdbglib.s: Likewise.
     598
     5992002-11-22  Alan Modra  <amodra@bigpond.net.au>
     600
     601        * ld-elf/elf.exp: Remove sec64k test.
     602        * ld-elf/sec64k.exp: Reinstate.
     603
     6042002-11-21  Alan Modra  <amodra@bigpond.net.au>
     605
     606        * ld-elf/elf.exp: Renamed from sec64k.exp.  Add test_list loop.
     607        * ld-elf/merge.s: New file.
     608        * ld-elf/merge.d: New file.
     609        * ld-elf/merge.ld: New file.
     610
     6112002-11-18  Svein E. Seldal  <Svein.Seldal@solidas.com>
     612
     613        * ld-scripts/script.exp: Setup for tic4x testcase
     614
     6152002-11-15  Nick Clifton  <nickc@redhat.com>
     616
     617        * ld-h8300: New directory.
     618        * ld-h8300/h8300.exp: New expect script.  Only run tests for h8300
     619        targets.
     620        * ld-h8300/relax.s: New assembler source file.
     621        * ld-h8300/relax.d: New expected output file.
     622
     6232002-11-11  Hans-Peter Nilsson  <hp@axis.com>
     624
     625        * ld-elf/sec64k.exp: New test.
     626        * lib/ld-lib.exp (run_dump_test): Don't prepend "$srcdir/$subdir/"
     627        to a source file starting with "/".
     628
     6292002-11-10  Hans-Peter Nilsson  <hp@bitrange.com>
     630
     631        * ld-mmix/local1.d, ld-mmix/local3.d, ld-mmix/local5.d,
     632        ld-mmix/local7.d: Tweak for change in readelf output.
     633
     6342002-11-09  Alan Modra  <amodra@bigpond.net.au>
     635
     636        * ld-elfvsb/define.s: Avoid use of @ in .type directive.
     637
     6382002-11-07  Hans-Peter Nilsson  <hp@axis.com>
     639
     640        * ld-cris/expdyn6.d, ld-cris/weakref2.d, ld-cris/expdyn7.d,
     641        ld-cris/nodyn5.d, ld-cris/expdyn5.d: New tests.
     642
     6432002-11-07  Nick Clifton  <nickc@redhat.com>
     644
     645        * ld-fastcall/fastcall.exp: Only run tests for PE type x86
     646        targets.
     647
     6482002-11-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
     649
     650        * ld-sh/rd-sh.exp: Set asflags_save always.
     651
     6522002-11-07  Casper S. Hornstrup  <chorns@users.sourceforge.net>
     653
     654        * ld-fastcall: New directory for testing fastcall support.
     655        * ld-fastcall/export.s: New file for testing fastcall symbol
     656        handling.
     657        * ld-fastcall/import.s: Likewise.
     658        * ld-fastcall/fastcall.exp: Likewise.
     659
     6602002-11-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
     661
     662        * ld-sh/rd-sh.exp: Add -isa=SHcompact to ASFLAGS for SH-5.
     663        * ld-sh/tlsbin-1.d: Handle GOT_BIAS appropriately for SH-5.
     664        * ld-sh/tlspic-1.d: Likewise.
     665        * ld-sh/tlspic-2.d: Likewise.
     666        * ld-sh/tlsbin-2.d: Likewise. Make it robust for the symbols
     667        defined by the linker scripts.
     668
     6692002-10-14  Stephane Carrez  <stcarrez@nerim.fr>
     670
     671        * ld-m68hc11/m68hc11.exp: Specific tests for 68HC11/68HC12.
     672        * ld-m68hc11/adj-jump.d: New test for linker relaxation.
     673        * ld-m68hc11/adj-jump.s: Likewise.
     674        * ld-m68hc11/adj-brset.s: Likewise.
     675        * ld-m68hc11/adj-brset.d: Likewise.
     676        * ld-m68hc11/relax-direct.s: Likewise.
     677        * ld-m68hc11/relax-direct.d: Likewise.
     678        * ld-m68hc11/relax-group.s: Likewise.
     679        * ld-m68hc11/relax-group.d: Likewise.
     680        * ld-m68hc11/bug-1403.d: Likewise.
     681        * ld-m68hc11/bug-1403.s: Likewise.
     682
     6832002-10-14  Stephen Clarke <stephen.clarke@superh.com>
     684        * ld-sh/ld-r-1.d: Disable for sh64*-*-linux*.
     685        * ld-sh/sh64/sh64.exp: Likewise.
     686        * ld-sh/sh.exp: Disable relaxing tests for sh64*-*-linux*.
     687        * ld-sh/sh64/abi32.sd: Adjust expected output to include
     688        sh64*-*-linux* formats too.
     689        * ld-sh/sh64/relax.exp: Add emul32 variable to hold target
     690        emulation, and set it appropriately for sh*-*-linux*.
     691        * ld-sh/sh64/relfail.exp: Add variables to hold target
     692        emulation, output format, start symbol, and whether target
     693        supports 64-bit ABI.  Set appropriately for sh*-*-linux*.
     694
     6952002-10-12  H.J. Lu  (hjl@gnu.org)
     696
     697        * ld-discard/extern.d: Remove $srcdir/$subdir/.
     698        * ld-discard/start.d: Likewise.
     699        * ld-discard/static.d: Likewise.
     700        * ld-linkonce/zeroehl32.d: Likewise.
     701        * ld-selective/keepdot.d: Likewise.
     702        * ld-selective/keepdot0.d: Likewise.
     703
     7042002-10-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
     705
     706        * ld-sh/rd-sh.exp: If the test matches *-dso.d, copy the output
     707        of linker to the file tmpdir/*-dso.so.
     708        * ld-sh/tlsbin.s, ld-sh/tlsbinpic.s, ld-sh/tlslib.s: New.
     709        * ld-sh/tlsbin-0-dso.d: New.
     710        * ld-sh/tlsbin-1.d: New.
     711        * ld-sh/tlsbin-2.d: New.
     712        * ld-sh/tlsbin-3.d: New.
     713        * ld-sh/tlsbin-4.d: New.
     714        * ld-sh/tlspic1.s, ld-sh/tlspic2.s: New.
     715        * ld-sh/tlspic-1.d: New.
     716        * ld-sh/tlspic-2.d: New.
     717        * ld-sh/tlspic-3.d: New.
     718        * ld-sh/tlspic-4.d: New.
     719
     7202002-10-10  Jakub Jelinek  <jakub@redhat.com>
     721
     722        * ld-i386/combreloc.s: New test.
     723        * ld-i386/combreloc.d: New test.
     724        * ld-i386/i386.exp (i386tests): Add it.
     725
     7262002-10-10  Alan Modra  <amodra@bigpond.net.au>
     727
     728        * ld-i386/i386.exp (reloc): Turn off combreloc.
     729        * ld-i386/reloc.d: Likewise.
     730        * ld-powerpc/powerpc.exp: Likewise.
     731        * ld-powerpc/reloc.d: Likewise.
     732
     7332002-10-03  H.J. Lu <hjl@gnu.org>
     734
     735        * ld-elfvers/vers21.c (_old_foobar): Initialized to -1 for gcc
     736        3.x.
     737
     7382002-10-03  Chris Demetriou  <cgd@broadcom.com>
     739
     740        * ld-mips-elf/branch-misc-1.d: Link at 0x500000 and use -N, to be
     741        more compatible with non-embedded targets.
     742        * ld-mips-elf/branch-misc-2.d: Likewise.
     743
     744        * ld-mips-elf/mips-elf.exp: Clean up some comments about embedded
     745        PIC tests.
     746        (elf): New variable, to control whether generic ELF tests are run.
     747        (embedded_elf): New variable, to control whether ELF tests
     748        requiring embedded PIC or embedded relocs are run.
     749
     7502002-10-02  Stephen Clarke <stephen.clarke@superh.com>
     751
     752        * ld-sh/sh64/gotplt.d, ld-sh/sh64/gotplt.map,
     753        ld-sh/sh64/gotplt.s: New test.
     754
     7552002-10-02  Stephen Clarke <stephen.clarke@superh.com>
     756        * ld-sh/sh64/cmpct1.sd : Fix linked file name.
     757        * ld-sh/sh64/crange3.dd: Likewise.
     758
     7592002-10-01  Jakub Jelinek  <jakub@redhat.com>
     760
     761        * ld-i386/i386.exp: Add tlsindntpoff test.
     762        * ld-i386/tlsindntpoff.s: New test.
     763        * ld-i386/tlsindntpoff.dd: New test.
     764
     7652002-10-01  Jakub Jelinek  <jakub@redhat.com>
     766
     767        * ld-x86-64/tlspic1.s: Change TLSGD sequences.
     768        * ld-x86-64/tlsbinpic.s: Likewise.
     769        * ld-x86-64/tlspic.dd: Adjust.
     770
     7712002-10-01  Jakub Jelinek  <jakub@redhat.com>
     772
     773        * ld-i386/i386.exp: Add tlsg test.
     774        * ld-i386/tlsg.s: New test.
     775        * ld-i386/tlsg.sd: New test.
     776        * ld-i386/tlsbin.dd: Change LD into LD -> LE in comments.
     777        * ld-i386/tlsbinpic.s: Likewise.
     778        * ld-x86-64/x86-64.exp: Add tlsg test.
     779        * ld-x86-64/tlsg.s: New test.
     780        * ld-x86-64/tlsg.sd: New test.
     781        * ld-x86-64/tlsbin.dd: Change LD into LD -> LE in comments.
     782        * ld-x86-64/tlsbinpic.s: Likewise.
     783
     7842002-09-30  Alan Modra  <amodra@bigpond.net.au>
     785
     786        * ld-powerpc/powerpc.exp: Restrict to 32 bit ELF.
     787
     7882002-09-30  Alan Modra  <amodra@bigpond.net.au>
     789
     790        * ld-powerpc/reloc.s, ld-powerpc/reloc.d: New.
     791        * ld-powerpc/powerpc.exp: New.
     792
     793        * ld-i386/reloc.s, ld-i386/reloc.d: New.
     794        * ld-i386/i386.exp: Run new test.
     795
     7962002-09-27  Jakub Jelinek  <jakub@redhat.com>
     797
     798        * lib/ld-lib.exp (run_ld_link_tests): Add.
     799        * ld-sh/sh64/sh64.exp (run_ld_link_tests, regexp_diff,
     800        file_contents): Remove.
     801        (sh64tests): Add 6th field to the tests array.
     802        * ld-i386/i386.exp (run_ld_link_tests): Remove.
     803        * ld-x86-64/x86-64.exp: New.
     804        * ld-x86-64/tlsbin.dd: New test.
     805        * ld-x86-64/tlsbinpic.s: New test.
     806        * ld-x86-64/tlsbin.rd: New test.
     807        * ld-x86-64/tlsbin.s: New test.
     808        * ld-x86-64/tlsbin.sd: New test.
     809        * ld-x86-64/tlsbin.td: New test.
     810        * ld-x86-64/tlslib.s: New test.
     811        * ld-x86-64/tlspic1.s: New test.
     812        * ld-x86-64/tlspic2.s: New test.
     813        * ld-x86-64/tlspic.dd: New test.
     814        * ld-x86-64/tlspic.rd: New test.
     815        * ld-x86-64/tlspic.sd: New test.
     816        * ld-x86-64/tlspic.td: New test.
     817
     8182002-09-21  Alan Modra  <amodra@bigpond.net.au>
     819
     820        * ld-undefined/undefined.exp: Adjust function test.
     821
     8222002-09-20  Alan Modra  <amodra@bigpond.net.au>
     823
     824        * ld-i386/i386.exp: Only run tests on ELF targets.
     825
     8262002-09-19  Jakub Jelinek  <jakub@redhat.com>
     827
     828        * ld-i386/i386.exp: New.
     829        * ld-i386/tlsbin.dd: New test.
     830        * ld-i386/tlsbinpic.s: New test.
     831        * ld-i386/tlsbin.rd: New test.
     832        * ld-i386/tlsbin.s: New test.
     833        * ld-i386/tlsbin.sd: New test.
     834        * ld-i386/tlsbin.td: New test.
     835        * ld-i386/tlslib.s: New test.
     836        * ld-i386/tlsnopic1.s: New test.
     837        * ld-i386/tlsnopic2.s: New test.
     838        * ld-i386/tlsnopic.dd: New test.
     839        * ld-i386/tlsnopic.rd: New test.
     840        * ld-i386/tlsnopic.sd: New test.
     841        * ld-i386/tlspic1.s: New test.
     842        * ld-i386/tlspic2.s: New test.
     843        * ld-i386/tlspic.dd: New test.
     844        * ld-i386/tlspic.rd: New test.
     845        * ld-i386/tlspic.sd: New test.
     846        * ld-i386/tlspic.td: New test.
     847
     8482002-09-18  Chris Demetriou  <cgd@broadcom.com>
     849
     850        * ld-mips-elf/branch-misc-1.d: New file.
     851        * ld-mips-elf/branch-misc-2.d: New file.
     852        * ld-mips-elf/mips-elf.exp: Run new tests.
     853
     8542002-09-05  Alan Modra  <amodra@bigpond.net.au>
     855
     856        * ld-sh/sh64/cmpct1.xd: Adjust for lack of abs section sym.
     857        * ld-sh/sh64/crange3-cmpct.rd: Likewise.
     858        * ld-sh/sh64/crange3-media.rd: Likewise.
     859        * ld-sh/sh64/crange3.rd: Likewise.
     860
     8612002-08-31  Hans-Peter Nilsson  <hp@bitrange.com>
     862
     863        * ld-mmix/bpo-10.d: Tweak for change in symbols handling.
     864        * ld-mmix/bpo-11.d: Ditto.
     865
     866        * ld-mmix/b-nosym.d: Adjust for changed output for absence of
     867        symbols.
     868
     869        * ld-mmix/sec-7m.d: Rename tested section from .debug_info to
     870        .di.
     871        * ld-mmix/sec-7a.s, ld-mmix/sec-7b.s, ld-mmix/sec-7c.s,
     872        ld-mmix/sec-7d.s, ld-mmix/sec-7e.s: Ditto.
     873
     8742002-08-28  Alan Modra  <amodra@bigpond.net.au>
     875
     876        * ld-discard/discard.exp: xfail m6812.
     877        * ld-scripts/map-address.d: Adjust for extras emitted by pe targets.
     878
     8792002-08-27  Alan Modra  <amodra@bigpond.net.au>
     880
     881        * ld-mmix/b-nosym.d: Revert last change.
     882
     8832002-08-26  Alan Modra  <amodra@bigpond.net.au>
     884
     885        * ld-mmix/b-nosym.d: Adjust for "no symbols" on stdout.
     886
     8872002-08-23  Stephen Clarke <stephen.clarke@superh.com>
     888
     889        * ld-sh/sh64/rd-sh64.exp: New framework file.
     890        * ld-sh/sh64/init-cmpct.d, ld-sh/sh64/init-media.d,
     891        ld-sh/sh64/init64.d, ld-sh/sh64/init.s: New tests for
     892        correct setting of ISA bit for init and fini entry-points.
     893
     8942002-08-16  Stephen Clarke <stephen.clarke@superh.com>
     895
     896        * ld-sh/sh64/sh64.exp: Add dlsection.
     897        * ld-sh/sh64/dlsection-1.s, ld-sh/sh64/dlsection.sd: New.
     898
     8992002-08-16  Alan Modra  <amodra@bigpond.net.au>
     900
     901        * ld-discard/discard.exp: xfail targets using generic linker.
     902        * ld-discard/extern.d: Allow "data" to be reduced to a section sym.
     903
     9042002-08-15  Hans-Peter Nilsson  <hp@axis.com>
     905
     906        * ld-cris/libdso-4.d, ld-cris/undef1.d: New test.
     907
     9082002-08-13  H.J. Lu <hjl@gnu.org>
     909
     910        * ld-elfvers/vers.exp: Add vers23c and vers23d.
     911
     912        * ld-elfvers/vers23c.ver: New.
     913        * ld-elfvers/vers23d.dsym: New.
     914
     9152002-08-12  H.J. Lu <hjl@gnu.org>
     916
     917        * ld-elfvers/vers.exp: Add vers23.
     918
     919        * ld-elfvers/vers23.c: New.
     920        * ld-elfvers/vers23.dsym: New.
     921        * ld-elfvers/vers23.ver: New.
     922        * ld-elfvers/vers23a.c: New.
     923        * ld-elfvers/vers23a.dsym: New.
     924        * ld-elfvers/vers23a.map: New.
     925        * ld-elfvers/vers23a.sym: New.
     926        * ld-elfvers/vers23a.ver: New.
     927        * ld-elfvers/vers23b.c: New.
     928        * ld-elfvers/vers23b.dsym: New.
     929        * ld-elfvers/vers23b.map: New.
     930        * ld-elfvers/vers23b.ver: New.
     931
     9322002-08-12  Stephen Clarke <stephen.clarke@superh.com>
     933
     934        * ld-sh/sh64/abi32.xd: Adjust whitespace in elf32 section
     935        listing.
     936        * ld-sh/sh64/cmpct1.xd, ld-sh/sh64/mix1.xd, ld-sh/sh64/mix2.xd,
     937        ld-sh/sh64/rel32.xd, ld-sh/sh64/shdl32.xd: Likewise.
     938        * ld-sh/sh64/abi32.xd: Adjust as type of linker-script-symbols
     939        is no longer set to object.
     940        * ld-sh/sh64/abi64.xd, ld-sh/sh64/cmpct1.xd, ld-sh/sh64/crange1.rd,
     941        ld-sh/sh64/crange2.rd, ld-sh/sh64/crange3-cmpct.rd,
     942        ld-sh/sh64/crange3-media.rd, ld-sh/sh64/crange3.rd,
     943        ld-sh/sh64/mix1.xd, ld-sh/sh64/mix2.xd, ld-sh/sh64/shdl32.xd,
     944        ld-sh/sh64/shdl64.xd: Likewise.
     945
     9462002-08-10  Alan Modra  <amodra@bigpond.net.au>
     947
     948        * ld-discard/discard.exp: Don't run on linuxaout or linuxoldld.
     949        * ld-linkonce/linkonce.exp: Likewise.
     950        * ld-selective/sel-dump.exp: Likewise.
     951        * ld-selective/selective.exp: Don't run on aout or bout.
     952
     9532002-08-08  H.J. Lu <hjl@gnu.org>
     954
     955        * ld-elfvers/vers.exp: Add vers22.
     956
     957        * ld-elfvers/vers22.c: New.
     958        * ld-elfvers/vers22.dsym: New.
     959        * ld-elfvers/vers22.map: New.
     960        * ld-elfvers/vers22.ver: New.
     961        * ld-elfvers/vers22a.c: New.
     962        * ld-elfvers/vers22a.dsym: New.
     963        * ld-elfvers/vers22a.sym: New.
     964        * ld-elfvers/vers22a.ver: New.
     965        * ld-elfvers/vers22b.c: New.
     966        * ld-elfvers/vers22b.dsym: New.
     967        * ld-elfvers/vers22b.ver: New.
     968
     9692002-08-07  H.J. Lu <hjl@gnu.org>
     970
     971        * ld-elfvers/vers.exp: Add --no-undefined-version.
     972
     973        * ld-elfvers/vers1.map: Remove the unused foo1 and foo2.
     974        * ld-elfvers/vers8.map: Likewise.
     975        * ld-elfvers/vers18.map: Likewise.
     976
     9772002-07-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>
     978
     979        * ld-discard/discard.exp, ld-scripts/phdrs.exp, ld-scripts/phdrs2.exp,
     980        ld-selective/sel-dump.exp: Test hppa*64*-*-hpux* target.
     981        * ld-elfvers/vers.exp, ld-elfvsb/elfvsb.exp, ld-elfweak/elfweak.exp,
     982        ld-linkonce/linkonce.exp, ld-shared/shared.exp,
     983        ld-undefined/weak-undef.exp:  Test hppa*64*-*-hpux* and hppa*-*-linux*
     984        targets.
     985        * ld-discard/exit.s, ld-discard/extern.s, ld-discard/start.s,
     986        ld-discard/static.s: Add whitespace before assembler directives.
     987
     9882002-07-29  Chris Demetriou  <cgd@broadcom.com>
     989
     990        * ld-mips-elf/mips16-1.d: Check that ASE flag is actually set.
     991
     9922002-07-26  Richard Sandiford  <rsandifo@redhat.com>
     993
     994        * ld-mips-elf/mips16-1.d,
     995        * ld-mips-elf/mips16-1[ab].s: New test.
     996        * ld-mips-elf/mips-elf.exp: Run it.
     997
     9982002-07-19  Hans-Peter Nilsson  <hp@bitrange.com>
     999
     1000        * ld-mmix/sec-1.d: Adjust for changes in padding.
     1001        * ld-mmix/sec-3.d: Ditto.
     1002
     10032002-07-15  H.J. Lu <hjl@gnu.org>
     1004
     1005        * ld-elfvers/vers.exp: Add vers21.
     1006
     1007        * ld-elfvers/vers21.c: New.
     1008        * ld-elfvers/vers21.dsym: New.
     1009        * ld-elfvers/vers21.map: New.
     1010        * ld-elfvers/vers21.sym: New.
     1011        * ld-elfvers/vers21.ver: New.
     1012
     10132002-07-12  Hans-Peter Nilsson  <hp@axis.com>
     1014
     1015        * ld-cris/nodyn4.d, ld-cris/expdyn4.d, ld-cris/comref1.s,
     1016        ld-cris/euwref1.s, ld-cris/expdyn3.d, ld-cris/expdyn2.d,
     1017        ld-cris/expdref1.s: New tests.
     1018
     10192002-07-09  Richard Sandiford  <rsandifo@redhat.com>
     1020
     1021        * ld-scripts/dynamic-sections*: New test.
     1022
     10232002-07-09  Hans-Peter Nilsson  <hp@axis.com>
     1024
     1025        * ld-cris/libdso-3.d, ld-cris/dso-3.s, ld-cris/noglob1.s,
     1026        ld-cris/noglob1.d: New tests.
     1027
     1028        * ld-cris/libdso-1.d: Tweak for change in size of dynamic sections.
     1029
     10302002-07-03  Alan Modra  <amodra@bigpond.net.au>
     1031
     1032        * lib/ld-lib.exp (default_ld_nm): Run nm with LC_ALL=C to ensure
     1033        consistent sorting.
     1034        (run_dump_test): Likewise for objdump/nm/objcopy/readelf.
     1035        * ld-sh/sh64/sh64.exp (run_ld_link_tests): Likewise.
     1036
     10372002-06-29  Hans-Peter Nilsson  <hp@bitrange.com>
     1038
     1039        * ld-mmix/sec-8m.d, ld-mmix/sec-8m.s, ld-mmix/sec-8a.s,
     1040        ld-mmix/sec-8b.s, ld-mmix/sec-8d.s: New test.
     1041
     10422002-06-18  Chris Demetriou  <cgd@broadcom.com>
     1043
     1044        * ld-mips-elf/empic2-ref.s: Add a missing .end, apparently
     1045        turned up by recent assembler changes.
     1046
     10472002-06-17  Tom Rix  <trix@redhat.com>
     1048
     1049        * ld-d10v/d10v.exp: New driver for d10v.
     1050        * ld-d10v/default_layout.d : New test.
     1051        * ld-d10v/regression-001.lt: New test for a linker regression.
     1052        * ld-d10v/linktest-002.lt: New test for run_link_test.
     1053        * ld-d10v/reloc-001.d - reloc-016.d: New tests.
     1054
     10552002-06-11  John David Anglin  <dave@hiauly1.hia.nrc.ca>
     1056
     1057        * ld-scripts/cross1.t: Add .hash, .dynstr and .dynsym sections to
     1058        script.
     1059
     10602002-06-11  Andreas Jaeger  <aj@suse.de>
     1061
     1062        * ld-undefined/undefined.exp: Add s390x to dwarf2 xfails.
     1063
     10642002-06-10  Richard Sandiford  <rsandifo@redhat.com>
     1065
     1066        * ld-mips-elf/region1a.s,
     1067        * ld-mips-elf/region1b.s,
     1068        * ld-mips-elf/region1.t,
     1069        * ld-mips-elf/region1.d: New test.
     1070        * ld-mips-elf/mips-elf.exp: Run it.
     1071
     10722002-06-07  Nick Clifton  <nickc@cambridge.redhat.com>
     1073
     1074        * ld-scripts/phdrs2.s: Use .p2align instead of .align.
     1075        Use section names .foo and .bar instead of .text and .data.
     1076        * ld-scripts/phdrs2.t: Refer to .foo and .bar instead of .text
     1077        and .data.
     1078
     10792002-06-06  David Heine <dlheine@tensilica.com>
     1080
     1081        * ld-scripts/phdrs2.exp: New file: Run second phdrs test.
     1082        * ld-scripts/phdrs2.s: New file: Dummy assembler source.
     1083        * ld-scripts/phdrs2.t: New file: Linker script with an empty
     1084        section at the start of a loadable segment.
     1085
     10862005-06-02  H.J. Lu <hjl@gnu.org>
     1087
     1088        * ld-srec/sr3.cc (__dso_handle): Added for gcc 3.1 with
     1089        -fuse-cxa-atexit.
     1090        (__cxa_atexit): Likewise.
     1091
     10922002-05-30  Richard Henderson  <rth@redhat.com>
     1093
     1094        * ld-bootstrap/bootstrap.exp: Test --relax.
     1095
     10962002-05-28  Hans-Peter Nilsson  <hp@axis.com>
     1097
     1098        * ld-cris/libdso-2.d: Tweak for combreloc now default on.
     1099
     11002002-05-07  Richard Sandiford  <rsandifo@redhat.com>
     1101
     1102        * lib/ld-lib.exp (run_dump_test): Add -L$srcdir/$subdir.
     1103        (is_elf_format): New, extracted from...
     1104        * ld-scripts/weak.exp: ...here.
     1105        * ld-scripts/overlay-size.exp: New test.
     1106        * ld-scripts/overlay-size.[tsd],
     1107        * ld-scripts/overlay-size-map.d: New files for it.
     1108
     11092002-05-02  Richard Sandiford  <rsandifo@redhat.com>
     1110
     1111        * ld-scripts/map-address.exp: Quote conditions.
     1112
     11132002-04-30  Richard Sandiford  <rsandifo@redhat.com>
     1114
     1115        * ld-scripts/map-address.exp: New test.
     1116        * ld-scripts/map-address.[td]: New files for it.
     1117
     11182002-04-19  Richard Henderson  <rth@redhat.com>
     1119
     1120        * ld-elfvsb/elfvsb.exp: Mirror ia64 non-pic xfails for alpha.
     1121        * ld-shared/shared.exp: Likewise.
     1122        * ld-selective/selective.exp: Disable for alpha.
     1123        * ld-undefined/undefined.exp: Add alpha to dwarf2 xfails.
     1124
     11252002-04-05  Hans-Peter Nilsson  <hp@axis.com>
     1126
     1127        * ld-cris/libdso-2.d, ld-cris/dso-2.s, ld-cris/hide1: New test.
     1128
     11292002-03-19  Hans-Peter Nilsson  <hp@axis.com>
     1130
     1131        * ld-cris/ldsym1.d: New test.
     1132
     1133        * ld-mmix/bpo-1.d: Tweak for type of linker-script-symbols no
     1134        longer set to object.
     1135        * ld-mmix/undef-3.d, ld-mmix/start-1.d, ld-mmix/locto-1.d,
     1136        ld-mmix/loct-1.d, ld-mmix/locdo-1.d, ld-mmix/local7.d,
     1137        ld-mmix/local5.d, ld-mmix/local3.d, ld-mmix/local1.d,
     1138        ld-mmix/loc6.d, ld-mmix/loc4.d, ld-mmix/loc3.d, ld-mmix/loc2.d,
     1139        ld-mmix/loc1.d, ld-mmix/greg-7.d, ld-mmix/greg-6.d,
     1140        ld-mmix/greg-5.d, ld-mmix/greg-4.d, ld-mmix/greg-3.d,
     1141        ld-mmix/greg-2.d, ld-mmix/greg-19.d, ld-mmix/greg-1.d,
     1142        ld-mmix/bspec2.d, ld-mmix/bspec1.d, ld-mmix/bpo-9.d,
     1143        ld-mmix/bpo-6.d, ld-mmix/bpo-5.d, ld-mmix/bpo-4.d,
     1144        ld-mmix/bpo-3.d, ld-mmix/bpo-2.d, ld-mmix/bpo-19.d,
     1145        ld-mmix/bpo-18.d, ld-mmix/bpo-17.d, ld-mmix/bpo-16.d,
     1146        ld-mmix/bpo-14.d, ld-mmix/bpo-11.d, ld-mmix/bpo-10.d: Ditto.
     1147
     11482002-03-11  Andreas Jaeger  <aj@suse.de>
     1149
     1150        * ld-elfweak/strongdata.sym: Allow bss section for GCC 3.2 that
     1151        places zero initialized data in the bss.
     1152        * ld-elfweak/lddsodata.dsym: Likewise.
     1153
     11542002-03-07  Hans-Peter Nilsson  <hp@axis.com>
     1155
     1156        * ld-cris/expdyn1.d: Tweak for change in elf.sc.
     1157
     11582002-02-24  Hans-Peter Nilsson  <hp@bitrange.com>
     1159
     1160        * ld-sh/ld-r-1.d: Adjust to changes in readelf output.
     1161        * ld-sh/shared-1.d, ld-sh/sh64/crangerel1.rd, ld-sh/crangerel2.rd,
     1162        ld-sh/sh64/reldl32.rd, ld-sh/sh64/reldl64.rd: Ditto.
     1163
     11642002-02-18  Daniel Jacobowitz  <drow@mvista.com>
     1165
     1166        * ld-elfvsb/sh1.c: Fix typo in last change.
     1167
     11682002-02-17  Daniel Jacobowitz  <drow@mvista.com>
     1169
     1170        * ld-elfvsb/sh1.c: Use #pragma weak.
     1171
     11722002-02-17  Daniel Jacobowitz  <drow@mvista.com>
     1173
     1174        * vers.exp: Do not call diff -q.
     1175
     11762002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
     1177
     1178        * ld-mmix/b-nosym.d, ld-mmix/sec-6.d: Tweak for change in symbol
     1179        output.
     1180        * ld-mmix/sec-7m.d, ld-mmix/sec-7a.s, ld-mmix/sec-7b.s,
     1181        ld-mmix/sec-7c.s, ld-mmix/sec-7d.s, ld-mmix/sec-7e.s: New test.
     1182
     1183        * ld-mmix/bpo-22.d: New test.
     1184
     1185        * ld-mmix/local12.d (Sections): Match any LMA for .data, .sbss,
     1186        and .bss.
     1187
     11882002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
     1189
     1190        * ld-selective/selective.exp: Link against libgcc on
     1191        hppa*-*-linux* targets.
     1192
     11932002-02-11  Alexandre Oliva  <aoliva@redhat.com>
     1194
     1195        * ld-sh/sh64/reldl64.rd: Add relocation symbol data in info field.
     1196        * ld-sh/sh64/crange-2i.s: Add align to match align in crange-2h.s.
     1197        * ld-sh/sh64/crange3-cmpct.rd: Adjust to reflect modifications
     1198        in section ordering.
     1199        * ld-sh/sh64/crange3-media.rd: Likewise.
     1200        * ld-sh/sh64/crange3.rd: Likewise.
     1201        * ld-sh/sh64/crange3.dd: Likewise.
     1202
     1203        * ld-sh/shared-1.d: Fix relocation addend.
     1204
     12052002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
     1206
     1207        * ld-mmix/bpo-21.d, ld-mmix/bpo-21m.d, ld-mmix/bpo-11.s: New
     1208        tests.
     1209
     12102002-02-08  Alexandre Oliva  <aoliva@redhat.com>
     1211
     1212        Contribute sh64-elf.
     1213        2002-02-02  Alexandre Oliva  <aoliva@redhat.com>
     1214        * ld-sh/sh64/crange3-cmpct.rd: Adjust offsets.
     1215        * ld-sh/sh64/crange3-media.rd: Likewise.
     1216        * ld-sh/sh64/crange3.rd: Likewise.
     1217        * ld-sh/sh64/crangerel1.rd: Likewise.
     1218        * ld-sh/sh64/crangerel2.rd: Likewise.
     1219        * ld-sh/sh64/reldl32.rd: Likewise.
     1220        * ld-sh/sh64/reldl64.rd: Likewise.
     1221        2002-01-28  Alexandre Oliva  <aoliva@redhat.com>
     1222        * ld-sh/sh64/abi32.xd: Formatting changes to match the current
     1223        output of objdump.
     1224        * ld-sh/sh64/cmpct1.xd: Likewise.
     1225        * ld-sh/sh64/crange1.rd: Likewise.
     1226        * ld-sh/sh64/crange2.rd: Likewise.
     1227        * ld-sh/sh64/crange3-cmpct.rd: Likewise.
     1228        * ld-sh/sh64/crange3-media.rd: Likewise.
     1229        * ld-sh/sh64/crange3.rd: Likewise.
     1230        * ld-sh/sh64/crangerel1.rd: Likewise.
     1231        * ld-sh/sh64/crangerel2.rd: Likewise.
     1232        * ld-sh/sh64/mix1.xd: Likewise.
     1233        * ld-sh/sh64/mix2.xd: Likewise.
     1234        * ld-sh/sh64/rel32.xd: Likewise.
     1235        * ld-sh/sh64/reldl32.rd: Likewise.
     1236        * ld-sh/sh64/reldl64.rd: Likewise.
     1237        * ld-sh/sh64/sh64.exp: Likewise.  Reordered cranges and stack
     1238        sessions, to match changes in the linker script.
     1239        2001-06-14  Alexandre Oliva  <aoliva@redhat.com>
     1240        * ld-sh/sh64/reldl32.rd, ld-sh/sh64/reldl64.rd: Adjust relocation
     1241        info to reflect renumbering of relocation types.
     1242        2001-03-14  DJ Delorie  <dj@redhat.com>
     1243        * ld-sh/sh64/endian.dbd: New file, endian tests.
     1244        * ld-sh/sh64/endian.dld: Ditto.
     1245        * ld-sh/sh64/endian.ld: Ditto.
     1246        * ld-sh/sh64/endian.s: Ditto.
     1247        * ld-sh/sh64/endian.sbd: Ditto.
     1248        * ld-sh/sh64/endian.sld: Ditto.
     1249        * ld-sh/sh64/sh64.exp: Add above tests.  Add -L option to ld.
     1250        2001-03-12  DJ Delorie  <dj@redhat.com>
     1251        * ld-sh/sh64/relax.exp: New file, test disabling relaxing.
     1252        * ld-sh/sh64/relax1.s: Ditto.
     1253        * ld-sh/sh64/relax2.s: Ditto.
     1254        * ld-sh/sh64/relax3.s: Ditto.
     1255        * ld-sh/sh64/relax4.s: Ditto.
     1256        * ld-sh/sh64/relfail.exp: New file, test for bogus relocs.
     1257        * ld-sh/sh64/relfail.s: Ditto.
     1258        2001-03-12  DJ Delorie  <dj@redhat.com>
     1259        * ld-sh/sh.exp: This test isn't appropriate for SH64 since it
     1260        uses SH32 assembler files.
     1261        2001-03-07  DJ Delorie  <dj@redhat.com>
     1262        * ld-selective/selective.exp: Pass "-e _start" for sh64 to
     1263        accomodate expected start symbol in test.
     1264        2001-03-06  DJ Delorie  <dj@redhat.com>
     1265        * ld-scripts/crossref.exp: Pass -mshelf32 to the linker for sh64,
     1266        to match what gcc passes to the linker by default.
     1267        * ld-selective/selective.exp: Ditto.
     1268        * ld-srec/srec.exp: Ditto, plus XFAIL for sh64.
     1269        * ld-undefined/undefined.exp: Add XFAIL for sh64 (it's dwarf2).
     1270        2001-03-06  DJ Delorie  <dj@redhat.com>
     1271        * ld-sh/sh64/abi32.xd (stack): Adjust for new default stack layout.
     1272        * ld-sh/sh64/abi64.xd (stack): Ditto.
     1273        * ld-sh/sh64/cmpct1.xd (stack): Ditto.
     1274        * ld-sh/sh64/crange1.rd (stack): Ditto.
     1275        * ld-sh/sh64/crange2.rd (stack): Ditto.
     1276        * ld-sh/sh64/crange3-cmpct.rd (stack): Ditto.
     1277        * ld-sh/sh64/crange3-media.rd (stack): Ditto.
     1278        * ld-sh/sh64/crange3.rd (stack): Ditto.
     1279        * ld-sh/sh64/mix1.xd (stack): Ditto.
     1280        * ld-sh/sh64/mix2.xd (stack): Ditto.
     1281        * ld-sh/sh64/shdl32.xd (stack): Ditto.
     1282        * ld-sh/sh64/shdl64.xd (stack): Ditto.
     1283        2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
     1284        * ld-sh/sh64/mix1.xd: Add SORT_ENTRIES for .cranges section.
     1285        * ld-sh/sh64/mix2.xd: Ditto.
     1286        2001-01-08  Hans-Peter Nilsson  <hpn@cygnus.com>
     1287        * ld-sh/sh64/abi32.xd: Adjust for bit 0 set on an entry address
     1288        being SHmedia.
     1289        * ld-sh/sh64/shdl64.xd: Ditto.
     1290        * ld-sh/sh64/shdl32.xd: Ditto.
     1291        * ld-sh/sh64/mix2.xd: Ditto.
     1292        * ld-sh/sh64/crange3-media.rd: Ditto.
     1293        * ld-sh/sh64/abi64.xd: Ditto.
     1294        2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
     1295        * ld-sh/sh64/crange-2a.s (diversion2): New global symbol.
     1296        * ld-sh/sh64/crange1.rd: Adjust to presence of new symbol.
     1297        Adjust section type for .cranges; expect sorted contents.
     1298        * ld-sh/sh64/crange2.rd: Ditto.
     1299        * ld-sh/sh64/crange3.dd, ld-sh/sh64/crange3.rd: Ditto.
     1300        * ld-sh/sh64/crangerel1.rd: Adjust to presence of new symbol.
     1301        * ld-sh/sh64/crangerel2.rd: Ditto.
     1302        * ld-sh/sh64/mix1.xd: Adjust to DEBUGGING being set for .cranges.
     1303        * ld-sh/sh64/mix2.xd: Ditto.
     1304        * ld-sh/sh64/crange3-cmpct.rd, ld-sh/sh64/crange3-media.rd: New
     1305        tests.
     1306        * ld-sh/sh64/sh64.exp: Tweak test message.  Run new tests.
     1307        2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
     1308        * ld-sh/sh64/shmix-1.s (start2): Add a NOP to provide a valid
     1309        target for (unexpanded) PTB.  Add an .align 2 to SHmedia code to
     1310        keep properly aligned.
     1311        * ld-sh/sh64/mix1.sd, ld-sh/sh64/mix1.xd: Adjust accordingly.
     1312        * ld-sh/sh64/mix1-noexp.sd, ld-sh/sh64/mix2-noexp.sd,
     1313        ld-sh/sh64/abixx-noexp.sd: New tests for GAS -no-expand and
     1314        R_SH_PT_16 relocation.
     1315        * ld-sh/sh64/sh64.exp: Run new tests.
     1316        2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
     1317        * ld-sh/sh64/crange-2f.s, ld-sh/sh64/crange-2g.s,
     1318        ld-sh/sh64/crange-2h.s, ld-sh/sh64/crange-2i.s,
     1319        ld-sh/sh64/crange3.dd, ld-sh/sh64/crange3.rd: New tests.
     1320        * ld-sh/sh64/sh64.exp: Run new tests.
     1321        * ld-sh/sh64/crange1.rd: Correct section flags.
     1322        * ld-sh/sh64/crange2.rd: Ditto.
     1323        * ld-sh/sh64/crangerel1.rd: Ditto.
     1324        2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
     1325        * ld-sh/sh64/crange-1.s, ld-sh/sh64/crange-2a.s,
     1326        ld-sh/sh64/crange-2b.s, ld-sh/sh64/crange-2c.s,
     1327        ld-sh/sh64/crange-2d.s, ld-sh/sh64/crange-2e.s,
     1328        ld-sh/sh64/crange1.rd, ld-sh/sh64/crange2.rd,
     1329        ld-sh/sh64/crangerel1.rd, ld-sh/sh64/crangerel2.rd: New tests for
     1330        handling .cranges section.
     1331        * ld-sh/sh64/sh64.exp: Run new tests.
     1332        * ld-sh/sh64/mix1.sd, ld-sh/sh64/mix1.xd, ld-sh/sh64/mix2.sd,
     1333        ld-sh/sh64/mix2.xd: Adjust for .cranges section.
     1334        2000-12-15  Hans-Peter Nilsson  <hpn@cygnus.com>
     1335        * ld-sh/sh64/abi32.sd, ld-sh/sh64/abi32.xd, ld-sh/sh64/abi64.sd,
     1336        ld-sh/sh64/abi64.xd, ld-sh/sh64/cmpct1.xd, ld-sh/sh64/mix1.sd,
     1337        ld-sh/sh64/mix1.xd, ld-sh/sh64/mix2.sd, ld-sh/sh64/mix2.xd,
     1338        ld-sh/sh64/shdl32.xd, ld-sh/sh64/shdl64.xd: Adjust to .bss and
     1339        .data individually 8-byte aligned.
     1340        2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
     1341        * ld-sh/sh64/rel-1.s, ld-sh/sh64/rel-2.s, ld-sh/sh64/rel32.xd,
     1342        ld-sh/sh64/rel64.xd, ld-sh/sh64/reldl-1.s, ld-sh/sh64/reldl-2.s,
     1343        ld-sh/sh64/reldl32.rd, ld-sh/sh64/reldl64.rd: New tests.
     1344        * ld-sh/sh64/sh64.exp: Make it possible to use readelf as
     1345        inspection tool.  Run new tests.
     1346        2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
     1347        * ld-sh/sh64/abi64.sd, ld-sh/sh64/abi32.sd, ld-sh/sh64/mix1.sd,
     1348        ld-sh/sh64/mix2.sd: Correct offsets in PT/PTA/PTB expansions.
     1349        * ld-sh/sh64/shdl-1.s, ld-sh/sh64/shdl-2.s, ld-sh/sh64/shdl64.sd,
     1350        ld-sh/sh64/shdl64.xd, ld-sh/sh64/shdl32.xd: New tests.
     1351        * ld-sh/sh64/sh64.exp: Run new tests.
     1352        2000-12-01  Hans-Peter Nilsson  <hpn@cygnus.com>
     1353        * ld-sh/sh64/cmpct1.sd, ld-sh/sh64/cmpct1.xd,
     1354        ld-sh/sh64/shcmp-1.s: New test.
     1355        * ld-sh/sh64/sh64.exp: Add new test to sh64tests.  Reformat.
     1356        2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
     1357        * ld-sh/sh64/sh64.exp: Use linker option -mshelf64 for 64-bit ABI
     1358        test.
     1359        * ld-sh/sh64/abi64.xd: Tweak for 64-bit ELF.
     1360        2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
     1361        * ld-sh/sh64/sh64.exp (sh64tests): Use linker option -mshelf32 for
     1362        tests.
     1363        2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
     1364        * ld-sh/sh64/abi32.sd, ld-sh/sh64/abi64.sd: Correct MOVI
     1365        registers.
     1366        * ld-sh/sh64/mix1.sd, ld-sh/sh64/mix1.xd, ld-sh/sh64/shmix-1.s:
     1367        New test.
     1368        * ld-sh/sh64/mix2.sd, ld-sh/sh64/mix2.xd, ld-sh/sh64/shmix-2.s,
     1369        ld-sh/sh64/shmix-3.s: New test.
     1370        * ld-sh/sh64/sh64.exp: Add new tests to sh64tests.
     1371        2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
     1372        * ld-sh/sh64: New testsuite.
     1373
     13742002-02-07  Hans-Peter Nilsson  <hp@axis.com>
     1375
     1376        * ld-selective/keepdot.s: Remove section specifier.
     1377
     13782002-02-05  Hans-Peter Nilsson  <hp@axis.com>
     1379
     1380        * ld-selective/keepdot.d, ld-selective/keepdot.ld,
     1381        ld-selective/keepdot.s, ld-selective/keepdot0.d: New tests.
     1382        * ld-selective/sel-dump.exp: New, driver for run_dump_test:s.
     1383
     13842002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
     1385
     1386        * ld-mmix/bpo-18.d, ld-mmix/bpo64addr.ld, ld-mmix/bpo-18m.d,
     1387        ld-mmix/bpo-9.s, ld-mmix/bpo-19.d, ld-mmix/bpo-19m.d,
     1388        ld-mmix/bpo-10.s, ld-mmix/bpo-20.d, ld-mmix/bpo-20m.d: New tests
     1389        for on-demand global register allocation.
     1390
     13912002-02-02  Alexandre Oliva  <aoliva@redhat.com>
     1392
     1393        * ld-sh/shared-1.d: Fix incorrect offsets.
     1394
     13952002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
     1396
     1397        * ld-mmix/bpo-1.d, ld-mmix/bpo-1.s, ld-mmix/bpo-1m.d,
     1398        ld-mmix/bpo-15.d, ld-mmix/bpo-4.s, ld-mmix/bpo-6.d,
     1399        ld-mmix/bpo-6.s, ld-mmix/bpo-2.d, ld-mmix/bpo-6m.d,
     1400        ld-mmix/bpo-12m.d, ld-mmix/bpo-2m.d, ld-mmix/bpo-2.s,
     1401        ld-mmix/bpo-5.s, ld-mmix/bpo-3.d, ld-mmix/start3.s,
     1402        ld-mmix/bpo-3m.d, ld-mmix/bpo-9m.d, ld-mmix/bpo-4.d,
     1403        ld-mmix/bpo-3.s, ld-mmix/bpo-4m.d, ld-mmix/bpo-7.d,
     1404        ld-mmix/bpo-5.d, ld-mmix/bpo-16.d, ld-mmix/bpo-5m.d,
     1405        ld-mmix/bpo-7m.d, ld-mmix/bpo-9.d, ld-mmix/bpo-8.d,
     1406        ld-mmix/start4.s, ld-mmix/bpo-8m.d, ld-mmix/bpo-13m.d,
     1407        ld-mmix/bpo-15m.d, ld-mmix/bpo-10.d, ld-mmix/bpo-11.d,
     1408        ld-mmix/bpo-14m.d, ld-mmix/bpo-13.d, ld-mmix/bpo-7.s,
     1409        ld-mmix/bpo-12.d, ld-mmix/bpo-16m.d, ld-mmix/bpo-14.d,
     1410        ld-mmix/bpo-8.s, ld-mmix/bpo-17.d, ld-mmix/bpo-17m.d: New tests.
     1411
     14122002-01-31  Hans-Peter Nilsson  <hp@axis.com>
     1413
     1414        * ld-cris/weakref1.d, ld-cris/libdso-1.d, ld-cris/gotrel2.s,
     1415        ld-cris/expdyn1.d, ld-cris/expdyn1.s, ld-cris/dso-1.s: New tests.
     1416        * ld-cris/cris.exp: Split run_dump_tests in two parts, executing
     1417        tests named *dso-*.d first and copying their tmpdir/dump to files
     1418        named as the .d-file.
     1419
     14202002-01-31  Alan Modra  <amodra@bigpond.net.au>
     1421
     1422        * ld-scripts/crossref.exp: Allow foo to have a leading dot.
     1423        * ld-scripts/cross1.t: Add .opd.
     1424        * ld-undefined/undefined.exp: Allow leading dot on sym names.
     1425        * lib/ld-lib.exp (default_ld_nm): Strip leading dots from syms.
     1426
     14272002-01-29  Chris Demetriou  <cgd@broadcom.com>
     1428
     1429        * ld-mips-elf/emrelocs-eb.d: New file to test --embedded-relocs.
     1430        * ld-mips-elf/emrelocs-el.d: Likewise.
     1431        * ld-mips-elf/emrelocs1.s: Likewise.
     1432        * ld-mips-elf/emrelocs2.s: Likewise.
     1433        * ld-mips-elf/emrelocs.ld: Likewise.
     1434        * ld-mips-elf/mips-elf.exp: Add the above to the list of tests.
     1435
     14362002-01-21  Hans-Peter Nilsson  <hp@axis.com>
     1437
     1438        * ld-cris: New testsuite directory.
     1439
     14402002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
     1441
     1442        * ld-sh/sh.exp: Copy start.s file into test directory.
     1443
     14442002-01-14  Nick Clifton  <nickc@cambridge.redhat.com>
     1445
     1446        * ld-selective/selective.exp: For ARM targets, link with libgcc.a.
     1447
     14482002-01-02  Chris Demetriou  <cgd@broadcom.com>
     1449
     1450        * ld-mips-elf/empic1-ln.d: New file to test basic linking of
     1451        R_MIPS_GNU_REL_HI16 and R_MIPS_GNU_REL_LO16 relocations.
     1452        * ld-mips-elf/empic1-lp.d: Likewise.
     1453        * ld-mips-elf/empic1-mn.d: Likewise.
     1454        * ld-mips-elf/empic1-mp.d: Likewise.
     1455        * ld-mips-elf/empic1-sn.d: Likewise.
     1456        * ld-mips-elf/empic1-sp.d: Likewise.
     1457        * ld-mips-elf/empic1-ref.s: Likewise.
     1458        * ld-mips-elf/empic1-space.s: Likewise.
     1459        * ld-mips-elf/empic1-tgt.s: Likewise.
     1460        * ld-mips-elf/empic2-fwd-0.d: New file to test
     1461        R_MIPS_GNU_REL_HI16 and R_MIPS_GNU_REL_LO16 relocation edge
     1462        cases.
     1463        * ld-mips-elf/empic2-fwd-1.d: Likewise.
     1464        * ld-mips-elf/empic2-rev-0.d: Likewise.
     1465        * ld-mips-elf/empic2-rev-1.d: Likewise.
     1466        * ld-mips-elf/empic2-ref.s: Likewise.
     1467        * ld-mips-elf/empic2-space.s: Likewise.
     1468        * ld-mips-elf/empic2-fwd-tgt.s: Likewise.
     1469        * ld-mips-elf/empic2-rev-tgt.s: Likewise.
     1470        * ld-mips-elf/mips-elf.exp: New file to run MIPS 32-bit ELF
     1471        tests (including those above).
     1472
     14732001-11-30  H.J. Lu <hjl@gnu.org>
     1474
     1475        * ld-elfvers/vers.exp (build_vers_lib): Preserve the library
     1476        order.
     1477
     14782001-11-29  H.J. Lu <hjl@gnu.org>
     1479
     1480        * ld-elfvers/vers.exp (build_vers_lib): Support linking against
     1481        more than one libraries.
     1482        Add "vers20a" and "vers20" tests for common symbols.
     1483
     1484        * ld-elfvers/vers20.c: New.
     1485        * ld-elfvers/vers20.dsym: New.
     1486        * ld-elfvers/vers20.map: New.
     1487        * ld-elfvers/vers20.ver: New.
     1488        * ld-elfvers/vers20a.ver: New.
     1489
     14902001-11-19  H.J. Lu <hjl@gnu.org>
     1491
     1492        * ld-elfvsb/define.s: Mark all global lables as object.
     1493
     1494        * ld-elfvsb/hidden0.d: Match large section number.
     1495        * ld-elfvsb/hidden1.d: Likewise.
     1496        * ld-elfvsb/internal0.d: Likewise.
     1497        * ld-elfvsb/internal1.d: Likewise.
     1498        * ld-elfvsb/protected0.d: Likewise.
     1499        * ld-elfvsb/protected1.d: Likewise.
     1500
     1501        * ld-elfvsb/hidden0.d: Change NOTYPE to OBJECT.
     1502        * ld-elfvsb/internal0.d: Likewise.
     1503        * ld-elfvsb/protected0.d: Likewise.
     1504
     15052001-11-15  H.J. Lu <hjl@gnu.org>
     1506
     1507        * ld-sh/ld-r-1.d: Updated.
     1508
     15092001-11-14  Nick Clifton  <nickc@cambridge.redhat.com>
     1510
     1511        * ld-bootstrap/bootstrap.exp: Only scan tail of executable for
     1512        PE targets.
     1513
     15142001-11-12  Donn Terry <donnte@microsoft.com>
     1515
     1516        * ld-bootstrap/bootstrap.exp: Only compare the tail end of the two
     1517        binary files produced in order to avoid date stamp present in PE
     1518        binaries.
     1519
     15202001-11-11  Hans-Peter Nilsson  <hp@bitrange.com>
     1521
     1522        * ld-mmix/sec-5.d (Sections): Add whitespace missing in commit.
     1523
     15242001-11-09  H.J. Lu <hjl@gnu.org>
     1525
     1526        * ld-discard/discard.exp: New. Test ld discard.
     1527        * ld-discard/discard.ld: Likewise.
     1528        * ld-discard/exit.s: Likewise.
     1529        * ld-discard/extern.d: Likewise.
     1530        * ld-discard/extern.s: Likewise.
     1531        * ld-discard/start.d: Likewise.
     1532        * ld-discard/start.s: Likewise.
     1533        * ld-discard/static.d: Likewise.
     1534        * ld-discard/static.s: Likewise.
     1535
     15362001-11-02  H.J. Lu  <hjl@gnu.org>
     1537
     1538        * ld-elfvsb/elfvsb.exp: Add the "ld -r" test.
     1539
     1540        * ld-elfvsb/hidden0.d: New.
     1541        * ld-elfvsb/hidden1.d: New.
     1542        * ld-elfvsb/internal0.d: New.
     1543        * ld-elfvsb/internal1.d: New.
     1544        * ld-elfvsb/protected0.d: New.
     1545        * ld-elfvsb/protected1.d: New.
     1546        * ld-elfvsb/undef.s: New.
     1547        * ld-elfvsb/undef.s: New.
     1548
     15492001-11-02  NIIBE Yutaka  <gniibe@m17n.org>
     1550
     1551        * ld-sh/sh.exp: Have its own start.s for linux.
     1552
     15532001-10-31  Hans-Peter Nilsson  <hp@bitrange.com>
     1554
     1555        * ld-mmix/locdo-1.d: Prune character dump part.
     1556        * ld-mmix/local7m.d, ld-mmix/loc4.d, ld-mmix/loc4m.d,
     1557        ld-mmix/loc1.d, ld-mmix/bspec1m.d, ld-mmix/bspec2m.d,
     1558        ld-mmix/b-nosym.d, ld-mmix/b-fixo2.d, ld-mmix/b-loc64k.d,
     1559        ld-mmix/undef-3m.d, ld-mmix/locto.s, ld-mmix/loct.s,
     1560        ld-mmix/local3m.d, ld-mmix/local1m.d, ld-mmix/loc6m.d,
     1561        ld-mmix/loc2.s, ld-mmix/loc1.s, ld-mmix/gregldo1.s,
     1562        ld-mmix/dloc1.s, ld-mmix/b-widec3.s, ld-mmix/b-nosym.s: Remove
     1563        unnecessary empty lines.
     1564
     15652001-10-30  Hans-Peter Nilsson  <hp@bitrange.com>
     1566
     1567        * ld-mmix: New testsuite directory.
     1568
     15692001-10-14  Hans-Peter Nilsson  <hp@bitrange.com>
     1570
     1571        * ld-sh/sub2l-1.d, ld-sh/shared-1.d, ld-sh/weak1.d: Only run on
     1572        sh*-*-elf.
     1573
     1574        * lib/ld-lib.exp (run_dump_test): Fix typo: asflags(), not asflags{}.
     1575
     1576        * ld-sh/rd-sh.exp: New framework file.
     1577        * ld-sh/ld-r-1.d, ld-sh/ldr1.s, ld-sh/ldr2.s, ld-sh/shared-1.d,
     1578        ld-sh/weak1.s, ld-sh/weak1.d, ld-sh/sub2l.s, ld-sh/sub2l-1.d: New
     1579        test files.
     1580
     15812001-09-29  Hans-Peter Nilsson  <hp@axis.com>
     1582
     1583        * ld-linkonce/linkonce.exp: New file.
     1584        * ld-linkonce/x.s, ld-linkonce/y.s, ld-linkonce/zeroeh.ld,
     1585        ld-linkonce/zeroehl32.d: New test.
     1586
     15872001-09-25  H.J. Lu  <hjl@gnu.org>
     1588
     1589        * ld-elfweak/dso.dsym: Updated for alpha.
     1590        * ld-elfweak/dsodata.dsym: Likewise.
     1591        * ld-elfweak/strong.sym: Likewise.
     1592        * ld-elfweak/strongcomm.sym: Likewise.
     1593        * ld-elfweak/strongdata.sym: Likewise.
     1594
     15952001-09-15  Hans-Peter Nilsson  <hp@bitrange.com>
     1596
     1597        * lib/ld-lib.exp (run_dump_test): Handle new option
     1598        "objcopy_linked_file".  Return after failing, if errors were
     1599        expected but none were found.
     1600        (slurp_options): Support underscores in option names.
     1601
     16022001-09-14  H.J. Lu  <hjl@gnu.org>
     1603
     1604        * ld-elfweak/bar.c: Updated.
     1605        * ld-elfweak/bar1a.c: Likewise.
     1606        * ld-elfweak/main.c: Likewise.
     1607        * ld-elfweak/main1.c: Likewise.
     1608        * ld-elfweak/elfweak.exp: Likewise.
     1609        * ld-elfweak/weakdata.dsym: Updated.
     1610
     16112001-09-11  H.J. Lu  <hjl@gnu.org>
     1612
     1613        * ld-elfweak/elfweak.exp (build_lib): Take a list of object
     1614        files.
     1615        (build_exec): Likewise.
     1616        Add more tests and make some xfail.
     1617
     1618        * ld-elfweak/dso.dsym: Support symbol versioning.
     1619        * ld-elfweak/dsow.dsym: Likewise.
     1620
     1621        * ld-elfweak/main1.c: New.
     1622        * ld-elfweak/bar1a.c: Likewise.
     1623        * ld-elfweak/bar1b.c: Likewise.
     1624        * ld-elfweak/bar1c.c: Likewise.
     1625        * ld-elfweak/foo1a.c: Likewise.
     1626        * ld-elfweak/foo1b.c: Likewise.
     1627        * ld-elfweak/dsodata.dsym: Likewise.
     1628        * ld-elfweak/dsowdata.dsym: Likewise.
     1629        * ld-elfweak/weakdata.dsym: Likewise.
     1630        * ld-elfweak/strongcomm.sym: Likewise.
     1631        * ld-elfweak/strongdata.sym: Likewise.
     1632        * ld-elfweak/weakdata.dat: Likewise.
     1633        * ld-elfweak/strongdata.dat: Likewise.
     1634
     16352001-09-10  H.J. Lu  <hjl@gnu.org>
     1636
     1637        * ld-elfweak/elfweak.exp: New.
     1638        * ld-elfweak/bar.c: Likewise.
     1639        * ld-elfweak/foo.c: Likewise.
     1640        * ld-elfweak/main.c: Likewise.
     1641        * ld-elfweak/dso.dsym: Likewise.
     1642        * ld-elfweak/dsow.dsym: Likewise.
     1643        * ld-elfweak/strong.sym: Likewise.
     1644        * ld-elfweak/strong.dat: Likewise.
     1645        * ld-elfweak/weak.dat: Likewise.
     1646
     16472001-08-27  Alan Modra  <amodra@bigpond.net.au>
     1648            Linus Nordberg  <linus@swox.se>
     1649
     1650        * ld-checks/checks.exp: .lcomm is incompatible with ppc coff.
     1651        * ld-scripts/cross1.t: Add .toc section.
     1652        * ld-scripts/cross2.t: Likewise.
     1653        * ld-scripts/phdrs.exp: powerpc64 is 64 bit.
     1654        * ld-srec/srec.exp: xfail powerpc64
     1655
     16562001-08-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>
     1657
     1658        * ld-selective/selective.exp: Return if target is `vax-*-ultrix*'.
     1659        Continue with other tests when there is a compilation error.
     1660
     16612001-08-01  Loren J. Rittle  <ljrittle@acm.org>
     1662
     1663        * ld-cdtest/cdtest-nrv.dat: New file.
     1664        * ld-cdtest/cdtest.exp: Do not require any exception support
     1665        library.  Check results against NRV.
     1666
     16672001-08-01  Loren J. Rittle  <ljrittle@acm.org>
     1668
     1669        * ld-srec/srec.exp: Do not require any exception support
     1670        library.
     1671
     16722001-07-27  H.J. Lu  <hjl@gnu.org>
     1673
     1674        * ld-selective/selective.exp: Fix the error in the last change.
     1675
     16762001-07-24  Loren J. Rittle  <ljrittle@acm.org>
     1677
     1678        * ld-selective/selective.exp: Support g++ V3 ABI (along side
     1679        the old ABI).  Make comparisons against normalized (to
     1680        V3-style) demangled nm output.
     1681
     16822001-07-24  Alan Modra  <amodra@bigpond.net.au>
     1683
     1684        * config/default.exp (ld_nm): Add "nmflags" arg.
     1685        * lib/ld-lib.exp (default_ld_nm): Likewise.
     1686        * ld-empic/empic.exp: Adjust call to ld_nm.
     1687        * ld-scripts/defined.exp: Likewise.
     1688        * ld-scripts/script.exp: Likewise.
     1689        * ld-scripts/sizeof.exp: Likewise.
     1690        * ld-selective/selective.exp: Likewise.
     1691        * ld-sh/sh.exp: Likewise.
     1692
     16932001-07-12  H.J. Lu  <hjl@gnu.org>
     1694
     1695        * ld-selective/selective.exp: Mark selective1, selective2,
     1696        selective4 and selective5 xfail on alpha*-*.
     1697
     16982001-06-13  Hans-Peter Nilsson  <hp@bitrange.com>
     1699
     1700        * config/default.exp (AS, GASP, OBJDUMP, NM, NMFLAGS, OBJCOPY,
     1701        OBJCOPYFLAGS, READELF, READELFFLAGS, LD, LDFLAGS): Provide
     1702        default.
     1703
     1704        * lib/ld-lib.exp (run_dump_test): Import from gas testsuite.  Add
     1705        new options "ld", "source", "xfail", "target", "notarget" and
     1706        "error".  Support the runtest_file_p "*.exp=testname" feature.
     1707        (slurp_options, regexp_diff, file_contents, verbose_eval): Import
     1708        from gas testsuite.
     1709
     17102001-06-12  Martin Schwidefsky <schwidefsky@de.ibm.com>
     1711
     1712        * testsuite/ld-undefined/undefined.exp: Correct setup_xfail rule.
     1713
     17142001-06-06  H.J. Lu  <hjl@gnu.org>
     1715
    51716        * ld-bootstrap/bootstrap.exp: Rebuild tmpdir/ld2 with tmpdir/ld3
    61717        on Linux/mips.
     1718
    71719        * ld-elfvers/vers.exp: Also run on Linux/mips.
    81720        * ld-elfvsb/elfvsb.exp: Likewise.
    91721        * ld-shared/shared.exp: Likewise.
     1722
    101723        * ld-selective/selective.exp: Mark selective2, selective3,
    111724        selective4 and selective5 xfail on Linux/mips.
     1725
    121726        * ld-shared/main.c: Skip invalid -Bsymbolic tests on Linux/mips.
     1727
    131728        * symbolic.dat: Remove invalid -Bsymbolic tests on Linux/mips.
     1729
    141730        * ld-srec/srec.exp: Add Linux/mips to xfail.
    151731
    16         2001-05-24  H.J. Lu  <hjl@gnu.org>
    17         * ld-scripts/phdrs.exp: Add sparc64 to 64 bit platform.
    18 
    19         2001-05-25  Alan Modra  <amodra@one.net.au>
     17322001-06-06  Martin Schwidefsky <schwidefsky@de.ibm.com>
     1733
     1734        * ld-undefined/undefined.exp: Add a setup_xfail line for a test
     1735        that will always fail on s/390.
     1736
     17372001-05-28  kaz Kojima  <kkojima@rr.iij4u.or.jp>
     1738
     1739        * ld-sh/sh.exp: For sh-*-linux-gnu target add a start address for
     1740        the text section.
     1741
     17422001-05-25  Alan Modra  <amodra@one.net.au>
     1743
    201744        * ld-elfvers/vers.exp: Replace linuxoldld with linux*oldld and
    211745        linuxaout with linux*aout.
    221746
    23         2001-05-01  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
     17472001-05-24  H.J. Lu  <hjl@gnu.org>
     1748
     1749        * ld-scripts/phdrs.exp: Add sparc64 to 64 bit platform.
     1750
     17512001-05-18  H.J. Lu  <hjl@gnu.org>
     1752
     1753        * ld-elfvers/vers.exp: Revert the last change.
     1754
     1755        * ld-elfvers/vers2.ver: Put back "tmpdir/" the version
     1756        references.
     1757        * ld-elfvers/vers3.ver: Likewise.
     1758        * ld-elfvers/vers6.ver: Likewise.
     1759        * ld-elfvers/vers18.ver: Likewise.
     1760
     17612001-05-17  H.J. Lu  <hjl@gnu.org>
     1762
     1763        * ld-elfvers/vers.exp: Pass "-rpath .:$tmpdir" to "vers19".
     1764
     1765        * ld-elfvers/vers1.ver: Remove "tmpdir/" from the version
     1766        definition.
     1767        * ld-elfvers/vers2.ver: Likewise.
     1768        * ld-elfvers/vers3.ver: Likewise.
     1769        * ld-elfvers/vers4a.ver: Likewise.
     1770        * ld-elfvers/vers6.ver: Likewise.
     1771        * ld-elfvers/vers7a.ver: Likewise.
     1772        * ld-elfvers/vers8.ver: Likewise.
     1773        * ld-elfvers/vers9.ver: Likewise.
     1774        * ld-elfvers/vers15.ver: Likewise.
     1775        * ld-elfvers/vers16a.ver: Likewise.
     1776        * ld-elfvers/vers17.ver: Likewise.
     1777        * ld-elfvers/vers18.ver: Likewise.
     1778
     17792001-05-03  H.J. Lu  <hjl@gnu.org>
     1780
     1781        * ld-elfvers/vers19.ver: Expect vers17.so instead of
     1782        *tmpdir/vers17.so.
     1783
     17842001-05-01  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
     1785
    241786        * ld-scripts/phdrs.exp: Fix regexp, s390x is 64 bit platform.
     1787
    251788        * ld-scripts/phdrs.t: Use startaddress that's greater than any
    261789        MAXPAGESIZE used.
    271790
    28         2001-04-29  H.J. Lu  <hjl@gnu.org>
     17912001-04-29  H.J. Lu  <hjl@gnu.org>
     1792
    291793        * ld-shared/symbolic.dat: New.
     1794
    301795        * ld-shared/shared.exp: Also check -Bsymbolic.
    311796
    32         2001-03-06  DJ Delorie  <dj@redhat.com>
     17972001-04-28  Andreas Jaeger  <aj@suse.de>
     1798
     1799        * ld-scripts/phdrs.exp: x86-64 is a 64 bit ELF platform, handle it
     1800        special.
     1801
     18022001-04-01  David O'Brien  <obrien@FreeBSD.org>
     1803        * ld-undefined/undefined.exp: XFAIL on FreeBSD/i386 for the usual (even
     1804        though it doesn't use DWARF2 yet (but its output is identical).
     1805
     18062001-04-01  David O'Brien  <obrien@FreeBSD.org>
     1807
     1808        * ld-selective/selective.exp: Use -O with gcc rather than -O2.
     1809        This optimization level is buggy on some platforms, and this test
     1810        is not intended to test compiler optimizations.
     1811
     18122001-03-06  DJ Delorie  <dj@redhat.com>
     1813
    331814        * ld-scripts/cross2.t: Support any type of text/data sections, not
    341815        just the canonical ones.
    351816
    36         2001-02-28  Matt Hiller  <hiller@redhat.com>
     18172001-02-28  Matt Hiller  <hiller@redhat.com>
     1818
    371819        * ld-scripts/crossref.exp: Initialize flags to [big_or_little_endian].
    381820        * ld-undefined/undefined.exp: Ditto, and include $flags in ld
     
    461828        (default_ld_simple_link): Ditto.
    471829
    48         2001-02-14  H.J. Lu  <hjl@gnu.org>
     18302001-02-22  Timothy Wall  <twall@cygnus.com>
     1831
     1832        * ld-bootstrap/bootstrap.exp: Exclude ia64 flavor from
     1833        AIX-specific test.
     1834
     18352001-02-14  H.J. Lu  <hjl@gnu.org>
     1836
    491837        * ld-bootstrap/bootstrap.exp: Rebuild tmpdir/ld2 with tmpdir/ld3
    501838        for -static on ia64.
     1839
    511840        * ld-checks/checks.exp: Don't run on ia64-*-elf* nor
    521841        ia64-*-linux*.
     1842
    531843        * ld-elfvers/vers.exp: Also run ia64-*-elf* and ia64-*-linux*.
     1844
    541845        * ld-elfvsb/elfvsb.exp: Use i?86-*-*. Also run on ia64-*-linux*.
    551846        Set up expected failures for ia64-*-linux*.
    561847        * ld-shared/shared.exp: Likewise.
    571848
    58 2001-06-07  Alan Modra  <amodra@bigpond.net.au>
    59 
    60         * Many files: Update copyright notices.
    61 
    62 2001-04-01  David O'Brien  <obrien@FreeBSD.org>
    63 
    64         * ld-bootstrap/bootstrap.exp: FreeBSD 4.3+ will fail on the --static test
    65         as the static ELF binary needs to have its EI_OSABI set to a supported
    66         value.  There is no longer a fallback interpretation due to a security
    67         issue.
    68         * ld-undefined/undefined.exp: XFAIL on FreeBSD/i386 for the usual (even
    69         though it doesn't use DWARF2 yet (but its output is identical).
    70 
    71 2001-04-01  David O'Brien  <obrien@FreeBSD.org>
    72 
    73         * ld-selective/selective.exp: Use -O with gcc rather than -O2.
    74         This optimization level is buggy on some platforms, and this test
    75         is not intended to test compiler optimizations.
    76 
    77 2001-03-18  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
    78 
    79         * ld-selective/selective.exp: Don't run test for 68hc11 and 68hc12
    80         because selective linking is not yet implemented.
    81 
    8218492001-02-08  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
    831850
     
    851852        to soft registers, define them with --defsym.
    861853        * ld-selective/selective.exp: Likewise.
     1854
     18552000-01-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
     1856
     1857        * ld-srec/sr3.cc (__rethrow): New.
    871858
    8818592001-01-14  Hans-Peter Nilsson  <hp@bitrange.com>
     
    2412012Fri Apr 21 15:16:07 2000  Richard Henderson  <rth@cygnus.com>
    2422013
    243         * testsuite/ld-scripts/phdrs.exp: IA-64 is 64-bit ELF too.
     2014        * ld-scripts/phdrs.exp: IA-64 is 64-bit ELF too.
    2442015
    24520162000-04-12  Alan Modra  <alan@linuxcare.com.au>
     
    3852156
    3862157        * ld-selective/selective.exp: Add expected failure for ARM-COFF
    387         targets. 
     2158        targets.
    3882159
    38921601999-02-16  Nick Clifton  <nickc@cygnus.com>
     
    3922163        Replace custom section names with .text, .data and .bss.
    3932164        * ld-checks/script: Replace custom section names with .text, .data
    394         and .bss. 
     2165        and .bss.
    3952166        * ld-checks/checks.exp: Replace custom section names with .text,
    396         .data and .bss. 
     2167        .data and .bss.
    3972168
    39821691999-02-11  Nick Clifton  <nickc@cygnus.com>
     
    4062177Tue Feb  2 19:15:02 1999  Catherine Moore  <clm@cygnus.com>
    4072178
    408         * ld-selective/selective.exp:  Disable test for unsupported
    409         targets.  Change tests to check for absence of symbols instead
    410         of address zero.
     2179        * ld-selective/selective.exp:  Disable test for unsupported
     2180        targets.  Change tests to check for absence of symbols instead
     2181        of address zero.
    4112182
    4122183Mon Jan 18 03:44:52 1999  Ian Lance Taylor  <ian@cygnus.com>
     
    4482219Fri Oct 23 16:28:29 1998 Catherine Moore  <clm@cygnus.com>
    4492220
    450        * ld-selective: New directory with new files to test
    451        selective linking.
    452 
    453        * lib/ld-lib.exp (ld_nm): Strip leading underscore from $name.
    454      
     2221        * ld-selective: New directory with new files to test
     2222        selective linking.
     2223
     2224        * lib/ld-lib.exp (ld_nm): Strip leading underscore from $name.
     2225
    4552226Sun Oct  4 22:17:05 1998  Ian Lance Taylor  <ian@cygnus.com>
    4562227
     
    4832254
    4842255        * ld-srec/srec.exp: Add arm/thumb-elf expected failures.
    485        
     2256
    4862257Thu Aug 13 12:41:58 1998  Ian Lance Taylor  <ian@cygnus.com>
    4872258
     
    5422313
    5432314        * ld-srec/srec.exp: Add xfails for powerpc*-*-eabi.
    544         (run_srec_test): On mn10200, define __truncsipsi2_do_d2.
     2315        (run_srec_test): On mn10200, define __truncsipsi2_do_d2.
    5452316        * ld-srec/sr1.c (__main): Change return type to void.
    5462317        * ld-srec/sr3.cc (__main): Likewise.
     
    6132384
    6142385        * ld-srec/sr3.cc: Add definitions for terminate, __terminate, and
    615         __throw, since the current g++ expects them to be defined.
     2386        __throw, since the current g++ expects them to be defined.
    6162387
    6172388Fri Oct  3 12:24:03 1997  Ian Lance Taylor  <ian@cygnus.com>
     
    7502521
    7512522        * ld-shared/shared.exp: Run the shared library tests on
    752         Linux/m68k.
     2523        Linux/m68k.
    7532524
    7542525Fri Apr  5 16:20:55 1996  Ian Lance Taylor  <ian@cygnus.com>
     
    9412712Mon Jul  3 14:26:37 1995  Steve Chamberlain  <sac@slash.cygnus.com>
    9422713
    943         * ld/testsuite/versados/(t1,t2).ld: End in newlines.
     2714        * versados/(t1,t2).ld: End in newlines.
    9442715
    9452716Mon May 22 20:19:38 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
     
    10682839
    10692840        * ld.bootstrap/bootstrap.exp, lib/ld.exp: Replace error proc
    1070           calls with perror calls.
     2841        calls with perror calls.
    10712842
    10722843Wed May 11 16:47:46 1994  Ken Raeburn  (raeburn@rtl.cygnus.com)
     
    10812852        indicating a pass, just return.
    10822853
    1083         * testsuite/ld.cdtest/{cdtest-foo.h,cdtest-foo.cc,cdtest-main.cc}:
     2854        * ld.cdtest/{cdtest-foo.h,cdtest-foo.cc,cdtest-main.cc}:
    10842855        Fix test case to be valid ANSI C++.  Don't require use of header
    10852856        files, so "../gcc/xgcc -B../gcc/" can be used for CXX.
    1086         * testsuite/ld.cdtest/cdtest.exp: Combine "rm" lines.  Add some
     2857        * ld.cdtest/cdtest.exp: Combine "rm" lines.  Add some
    10872858        commentary on things that are still broken with this test case.
    10882859
    10892860Fri Sep 10 09:58:23 1993  Jeffrey Wheat  (cassidy@cygnus.com)
    10902861
    1091         * testsuite/ld.cdtest/cdtest.exp: Added CXXFLAGS to compile stage.
     2862        * ld.cdtest/cdtest.exp: Added CXXFLAGS to compile stage.
    10922863
    10932864Thu Aug 12 16:05:37 1993  Jeffrey Wheat  (cassidy@cygnus.com)
    10942865
    1095         * testsuite/lib/ld.exp: add compiler and linker support
    1096         * testsuite/config/unix-ld.exp: add compiler and linker support
    1097         * testsuite/ld.bootstrap/bootstrap.exp: fixed to do partial links
    1098         * testsuite/ld.cdtest/cdtest.exp: constructor/destructor testscase
     2866        * lib/ld.exp: add compiler and linker support
     2867        * config/unix-ld.exp: add compiler and linker support
     2868        * ld.bootstrap/bootstrap.exp: fixed to do partial links
     2869        * ld.cdtest/cdtest.exp: constructor/destructor testscase
    10992870
    11002871Wed Aug  4 21:00:18 1993  Jeffrey Wheat  (cassidy@cygnus.com)
    11012872
    1102         * testsuite/lib/ld.exp: new file
    1103         * testsuite/config/unix-ld.exp: new file
    1104         * testsuite/ld.bootstrap/bootstrap.exp: new file
     2873        * lib/ld.exp: new file
     2874        * config/unix-ld.exp: new file
     2875        * ld.bootstrap/bootstrap.exp: new file
  • branches/GNU/src/binutils/ld/testsuite/config/default.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    6161set gcc_gas_flag "-B[pwd]/tmpdir/gas/"
    6262
     63# The mips64-*-linux-gnu compiler defaults to the N32 ABI after
     64# installed, but to the O32 ABI in the build tree, because of some
     65# specs-file hacks.  Make sure we use an ABI that is compatible with
     66# the one we expect.
     67if {[istarget mips64*-*-linux*] &&
     68    (![board_info [target_info name] exists multilib_flags] ||
     69     ![string match "*-mabi" [board_info [target_info name] multilib_flags]])
     70   } {
     71    append gcc_gas_flag " -mabi=n32"
     72}
     73
    6374# load the utility procedures
    6475load_lib ld-lib.exp
     
    159170#       run nm on a file
    160171#
    161 proc ld_nm { nm object } {
    162         default_ld_nm $nm $object
     172proc ld_nm { nm nmflags object } {
     173        default_ld_nm $nm $nmflags $object
    163174}
    164175
     
    171182}
    172183
     184# From gas-defs.exp, to support run_dump_test.
     185if ![info exists AS] then {
     186    set AS $as
     187}
     188
     189if ![info exists GASP] then {
     190    set GASP [findfile $base_dir/../gas/gasp-new $base_dir/../gas/gasp-new [transform gasp]]
     191}
     192
     193if ![info exists ASFLAGS] then {
     194    set ASFLAGS ""
     195}
     196
     197if ![info exists OBJDUMP] then {
     198    set OBJDUMP $objdump
     199}
     200
     201if ![info exists OBJDUMPFLAGS] then {
     202    set OBJDUMPFLAGS {}
     203}
     204
     205if ![info exists NM] then {
     206    set NM $nm
     207}
     208
     209if ![info exists NMFLAGS] then {
     210    set NMFLAGS {}
     211}
     212
     213if ![info exists OBJCOPY] then {
     214    set OBJCOPY $objcopy
     215}
     216
     217if ![info exists OBJCOPYFLAGS] then {
     218    set OBJCOPYFLAGS {}
     219}
     220
     221if ![info exists READELF] then {
     222    set READELF [findfile $base_dir/../binutils/readelf]
     223}
     224
     225if ![info exists READELFFLAGS] then {
     226    set READELFFLAGS {}
     227}
     228
     229if ![info exists LD] then {
     230    set LD [findfile $base_dir/ld-new ./ld-new [transform ld]]
     231}
     232
     233if ![info exists LDFLAGS] then {
     234    set LDFLAGS {}
     235}
  • branches/GNU/src/binutils/ld/testsuite/ld-bootstrap/bootstrap.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    3333# new ld, ld3.  ld2 and ld3 should be identical.
    3434
    35 foreach flags {"" "strip" "--static" "--traditional-format" "--no-keep-memory"} {
     35foreach flags {"" "strip" "--static" "--traditional-format"
     36               "--no-keep-memory" "--relax"} {
    3637    set do_strip "no"
    3738    if {"$flags" == "strip"} {
     
    4445        set testname "bootstrap"
    4546    }}
     47
     48    # --static is meaningless and --relax is incompatible with -r.
     49    set partial_flags "$flags"
     50    if { "$flags" == "--static" || "$flags" == "--relax" } {
     51        set partial_flags ""
     52    }
    4653
    4754    # This test can only be run if we have the ld build directory,
     
    5966    }
    6067
    61     if ![ld_relocate $ld tmpdir/ld-partial.o "$flags $OFILES"] {
     68    if ![ld_relocate $ld tmpdir/ld-partial.o "$partial_flags $OFILES"] {
    6269        fail $testname
    6370        continue
     
    6774    # You only want the import list when creating the final
    6875    # executable.
    69     if [istarget "*-*-aix*"] {
     76    if { [istarget "*-*-aix*"]
     77         && ![istarget "ia64-*-aix*"]} {
    7078        if {"$flags" == "--static"} {
    7179            set flags "--static -bI:/lib/syscalls.exp"
    7280        }
    73     }
    74 
    75     # On FreeBSD, running static ELF binaries requires that they have their
    76     # EI_OSABI set to a supported value.  There is no longer a fallback
    77     # interpretation.
    78     if {"$flags" == "--static"} {
    79         setup_xfail "*-*-freebsd4*"
    80         setup_xfail "*-*-freebsd5*"
    8181    }
    8282
     
    135135    }
    136136
    137     send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
    138     verbose "cmp tmpdir/ld2 tmpdir/ld3"
    139     catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output
     137    send_log "compare (tail of) tmpdir/ld2 tmpdir/ld3\n"
     138    verbose  "compare (tail of) tmpdir/ld2 tmpdir/ld3"
     139    if {[istarget "*-*-pe"]
     140        || [istarget "*-*-wince"]} {
     141        # Trim off the date present in PE binaries by only looking
     142        #   at the ends of the files
     143        # Although this works, a way to set the date would be better.
     144        # Removing or zeroing the date stamp in the binary produced by
     145        # the linker is not possible as it is required by the target OS.
     146        exec tail +140 tmpdir/ld2 >tmpdir/ld2tail
     147        exec tail +140 tmpdir/ld3 >tmpdir/ld3tail
     148        catch "exec cmp tmpdir/ld2tail tmpdir/ld3tail" exec_output
     149        exec rm tmpdir/ld2tail tmpdir/ld3tail
     150    } else {
     151        send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
     152        verbose  "cmp tmpdir/ld2 tmpdir/ld3"
     153        catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output
     154    }
    140155    set exec_output [prune_warnings $exec_output]
    141156
  • branches/GNU/src/binutils/ld/testsuite/ld-cdtest/cdtest.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11# Expect script for LD cdtest Tests
    2 #   Copyright 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
     2#   Copyright 1993, 1994, 1995, 1997, 2001 Free Software Foundation, Inc.
    33#
    44# This file is free software; you can redistribute it and/or modify
     
    3636}
    3737
    38 if { ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/cdtest-foo.cc tmpdir/cdtest-foo.o]
    39      || ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/cdtest-bar.cc tmpdir/cdtest-bar.o]
    40      || ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/cdtest-main.cc tmpdir/cdtest-main.o] } {
     38if {   ![ld_compile "$CXX $CXXFLAGS -fgnu-linker -fno-exceptions" $srcdir/$subdir/cdtest-foo.cc tmpdir/cdtest-foo.o]
     39    || ![ld_compile "$CXX $CXXFLAGS -fgnu-linker -fno-exceptions" $srcdir/$subdir/cdtest-bar.cc tmpdir/cdtest-bar.o]
     40    || ![ld_compile "$CXX $CXXFLAGS -fgnu-linker -fno-exceptions" $srcdir/$subdir/cdtest-main.cc tmpdir/cdtest-main.o] } {
    4141    unresolved $test1
    4242    unresolved $test2
     
    4444}
    4545
     46set expected_output "$srcdir/$subdir/cdtest.dat"
     47
    4648if ![ld_link $ld tmpdir/cdtest {tmpdir/cdtest-foo.o tmpdir/cdtest-bar.o tmpdir/cdtest-main.o}] {
    4749    fail $test1
    4850} else {
    49     send_log "tmpdir/cdtest >tmpdir/cdtest.out\n"
    50     verbose "tmpdir/cdtest >tmpdir/cdtest.out"
     51    send_log   "tmpdir/cdtest >tmpdir/cdtest.out\n"
     52    verbose    "tmpdir/cdtest >tmpdir/cdtest.out"
    5153    catch "exec tmpdir/cdtest >tmpdir/cdtest.out" exec_output
     54
    5255    if ![string match "" $exec_output] then {
    5356        send_log "$exec_output\n"
    5457        verbose "$exec_output" 1
     58
    5559        fail $test1
    5660    } else {
    57         send_log "diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat\n"
    58         verbose "diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat"
    59         catch "exec diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat" exec_output
     61        send_log   "diff tmpdir/cdtest.out $expected_output\n"
     62        verbose    "diff tmpdir/cdtest.out $expected_output"
     63        catch "exec diff tmpdir/cdtest.out $expected_output" exec_output
    6064        set exec_output [prune_warnings $exec_output]
     65
     66        if ![string match "" $exec_output] then {
     67            send_log "$exec_output\n"
     68            verbose  "$exec_output" 1
     69
     70            send_log "Checking against Named Return Value optimization\n"
     71            verbose  "Checking against Named Return Value optimization" 1
     72
     73            set expected_output "$srcdir/$subdir/cdtest-nrv.dat"
     74
     75            send_log   "diff tmpdir/cdtest.out $expected_output\n"
     76            verbose    "diff tmpdir/cdtest.out $expected_output"
     77            catch "exec diff tmpdir/cdtest.out $expected_output" exec_output
     78            set exec_output [prune_warnings $exec_output]
     79        }
    6180
    6281        if [string match "" $exec_output] then {
     
    6483        } else {
    6584            send_log "$exec_output\n"
    66             verbose "$exec_output" 1
     85            verbose  "$exec_output" 1
     86
    6787            fail $test1
    6888        }
     
    7696        fail $test2
    7797    } else {
    78         send_log "tmpdir/cdtest >tmpdir/cdtest.out\n"
    79         verbose "tmpdir/cdtest >tmpdir/cdtest.out"
     98        send_log   "tmpdir/cdtest >tmpdir/cdtest.out\n"
     99        verbose    "tmpdir/cdtest >tmpdir/cdtest.out"
    80100        catch "exec tmpdir/cdtest >tmpdir/cdtest.out" exec_output
     101
    81102        if ![string match "" $exec_output] then {
    82103            send_log "$exec_output\n"
    83             verbose "$exec_output" 1
     104            verbose  "$exec_output" 1
     105
    84106            fail $test2
    85107        } else {
    86             send_log "diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat\n"
    87             verbose "diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat"
    88             catch "exec diff tmpdir/cdtest.out $srcdir/$subdir/cdtest.dat" exec_output
     108            send_log   "diff tmpdir/cdtest.out $expected_output\n"
     109            verbose    "diff tmpdir/cdtest.out $expected_output"
     110            catch "exec diff tmpdir/cdtest.out $expected_output" exec_output
    89111            set exec_output [prune_warnings $exec_output]
    90112
     
    93115            } else {
    94116                send_log "$exec_output\n"
    95                 verbose "$exec_output" 1
     117                verbose  "$exec_output" 1
     118
    96119                fail $test2
    97120            }
  • branches/GNU/src/binutils/ld/testsuite/ld-checks/checks.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2525    global subdir
    2626   
    27     # The usage of .lcomm in asm.s is incompatible with ia64.
    28     if { [istarget ia64-*-elf*]
    29          || [istarget ia64-*-linux*] } {
     27    # The usage of .lcomm in asm.s is incompatible with ia64 and ppc coff.
     28    if { [istarget ia64-*-elf*] || [istarget ia64-*-linux*]
     29         || [istarget powerpc*-*-aix*] || [istarget powerpc-*-beos*]
     30         || [istarget rs6000-*-*] } {
    3031        return
    3132    }
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11# Expect script for ld-version tests
    2 #   Copyright 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
     2#   Copyright 1997, 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
    33#
    44# This file is free software; you can redistribute it and/or modify
     
    2626# Square bracket expressions seem to confuse istarget.
    2727# This is similar to the test that is used in ld-shared, BTW.
    28 if { ![istarget i?86-*-sysv4*] \
     28if { ![istarget hppa*64*-*-hpux*] \
     29     && ![istarget hppa*-*-linux*] \
     30     && ![istarget i?86-*-sysv4*] \
    2931     && ![istarget i?86-*-unixware] \
    3032     && ![istarget i?86-*-elf*] \
     
    4244     && ![istarget arm*-*-linux*] \
    4345     && ![istarget mips*-*-linux*] \
    44      && ![istarget alpha*-*-linux*] } {
     46     && ![istarget alpha*-*-linux*] \
     47     && ![istarget s390*-*-linux*] \
     48     && ![istarget sh\[34\]*-*-linux*] \
     49     && ![istarget x86_64-*-linux*] } {
    4550    return
    4651}
     
    6166set DOBJDUMP_FLAGS --dynamic-syms
    6267set SOBJDUMP_FLAGS --syms
    63 set shared --shared
     68set shared "--shared --no-undefined-version"
    6469set script --version-script
     70
     71if [istarget mips*-*-*] {
     72    set picflag ""
     73} else {
     74    # Unfortunately, the gcc argument is -fpic and the cc argument is
     75    # -KPIC.  We have to try both.
     76    set picflag "-fpic"
     77    send_log "$CC $picflag\n"
     78    verbose "$CC $picflag"
     79    catch "exec $CC $picflag" exec_output
     80    send_log "$exec_output\n"
     81    verbose "--" "$exec_output"
     82    if { [string match "*illegal option*" $exec_output] \
     83         || [string match "*option ignored*" $exec_output] \
     84         || [string match "*unrecognized option*" $exec_output] \
     85         || [string match "*passed to ld*" $exec_output] } {
     86        if [istarget *-*-sunos4*] {
     87            set picflag "-pic"
     88        } else {
     89            set picflag "-KPIC"
     90        }
     91    }
     92}
    6593
    6694proc test_ar { test lib object expect } {
     
    85113    catch "exec $nm --print-armap $tmpdir/$lib | grep \\\ in\\\  | egrep VERS\\\|bar\\\|foo | sort > $tmpdir/nm.out" exec_output
    86114    if [string match "" $exec_output] then {
    87         catch "exec $diff -q $tmpdir/nm.out $srcdir/$subdir/$expect" exec_output
     115        catch "exec $diff $tmpdir/nm.out $srcdir/$subdir/$expect" exec_output
    88116        set exec_output [prune_warnings $exec_output]
    89117        if [string match "" $exec_output] then {
     
    348376        close $file_b
    349377       
     378        # Support empty files.
     379        if { ![info exists list_a] && ![info exists list_b] } then {
     380            return 1
     381        }
     382
    350383        for { set i 0 } { $i < [llength $list_b] } { incr i } {
    351384            set line_b [lindex $list_b $i]
     
    426459        set f1 [open $tmpdir/objdump.out r]
    427460        set f2 [open $expectfile r]
    428         gets $f2 l2
     461        while { [gets $f2 l2] != -1 } {
     462            if { ![regexp "^#.*$" $l2] } then {
     463                break
     464            }
     465        }
    429466        while { [gets $f1 l1] != -1 } {
    430467            if { [string match $l2 $l1] } then {
     
    443480        close $f2
    444481
     482        # Support empty expected file.
     483        if [string match "" $l2] then {
     484            return 1
     485        }
     486
    445487        verbose -log "Did not find \"$l2\""
    446488        set f1 [open $tmpdir/objdump.out r]
     
    457499}
    458500
    459 proc build_vers_lib { test source libname other mapfile verexp versymexp symexp } {
     501proc build_binary { shared pic test source libname other mapfile verexp versymexp symexp } {
    460502    global ld
    461503    global srcdir
     
    468510    global CC
    469511    global CFLAGS
    470     global shared
    471512    global script
    472513
    473     if ![ld_compile "$CC -S $CFLAGS" $srcdir/$subdir/$source $tmpdir/$libname.s]     {
     514    if ![ld_compile "$CC -S $pic $CFLAGS" $srcdir/$subdir/$source $tmpdir/$libname.s]     {
    474515        unresolved "$test"
    475516        return
     
    481522    }
    482523
    483     if [string match "" $other] then {
    484         set other_lib ""
    485     } else {
    486         set other_lib $tmpdir/$other
     524    set other_lib ""
     525    if ![string match "" $other] then {
     526        foreach o $other {
     527            set other_lib "$other_lib $tmpdir/$o"
     528        }
    487529    }
    488530
     
    522564    pass $test
    523565   
     566}
     567
     568proc build_executable { test source libname other mapfile verexp versymexp symexp } {
     569  build_binary "" "" $test $source $libname $other $mapfile $verexp $versymexp $symexp
     570}
     571
     572proc build_vers_lib_no_pic { test source libname other mapfile verexp versymexp symexp } {
     573  global shared
     574  build_binary $shared "" $test $source $libname $other $mapfile $verexp $versymexp $symexp
     575}
     576
     577proc build_vers_lib_pic { test source libname other mapfile verexp versymexp symexp } {
     578  global picflag
     579  global shared
     580  build_binary $shared $picflag $test $source $libname $other $mapfile $verexp $versymexp $symexp
    524581}
    525582
     
    641698    global CFLAGS
    642699
    643     set shared --shared
     700    set shared "--shared --no-undefined-version"
    644701    set script --version-script
    645702    if ![ld_compile "$CC -S $CFLAGS" $srcdir/$subdir/$source $tmpdir/$execname.s]     {
     
    710767# Basic test - build a library with versioned symbols.
    711768#
    712 build_vers_lib "vers1" vers1.c vers1 "" vers1.map vers1.ver vers1.dsym vers1.sym
     769build_vers_lib_no_pic "vers1" vers1.c vers1 "" vers1.map vers1.ver vers1.dsym vers1.sym
    713770
    714771
     
    717774# 1.
    718775#
    719 build_vers_lib "vers2" vers2.c vers2 vers1.so vers2.map vers2.ver vers2.dsym ""
     776if [istarget x86_64-*-linux*] {
     777    # x86_64 doesn't like non-pic shared libraries
     778    xfail "vers2"
     779} else {
     780    build_vers_lib_no_pic "vers2" vers2.c vers2 vers1.so vers2.map vers2.ver vers2.dsym ""
     781}
    720782
    721783#
     
    755817# accessible.
    756818#
    757 build_vers_lib "vers7a" vers7a.c vers7a "" vers7.map vers7a.ver vers7a.dsym vers7a.sym
     819build_vers_lib_no_pic "vers7a" vers7a.c vers7a "" vers7.map vers7a.ver vers7a.dsym vers7a.sym
    758820
    759821test_ldfail "vers7" "" vers7.c vers7 vers7a.so "" "undefined reference to hide_a"
     
    765827#
    766828catch "exec cp $srcdir/$subdir/vers8.map $tmpdir/" ignore_output
    767 build_vers_lib "vers8" vers1.c vers8 vers8.map "" vers8.ver vers1.dsym vers1.sym
     829build_vers_lib_no_pic "vers8" vers1.c vers8 vers8.map "" vers8.ver vers1.dsym vers1.sym
    768830
    769831#
     
    810872# symbol appears in the dynamic symbol table of the executable.
    811873#
    812 build_vers_lib "vers16a" vers16a.c vers16a "" vers16.map vers16a.ver vers16a.dsym ""
     874build_vers_lib_no_pic "vers16a" vers16a.c vers16a "" vers16.map vers16a.ver vers16a.dsym ""
    813875build_exec "vers16" vers16.c vers16 "" vers16a.so "" vers16.dsym ""
    814876
    815877# Test a weak versioned symbol.
    816 build_vers_lib "vers17" vers17.c vers17 "" vers17.map vers17.ver vers17.dsym ""
    817 build_vers_lib "vers18" vers18.c vers18 vers17.so vers18.map vers18.ver vers18.dsym vers18.sym
     878build_vers_lib_no_pic "vers17" vers17.c vers17 "" vers17.map vers17.ver vers17.dsym ""
     879build_vers_lib_no_pic "vers18" vers18.c vers18 vers17.so vers18.map vers18.ver vers18.dsym vers18.sym
    818880build_exec "vers19" vers19.c vers19 "-rpath ." vers18.so vers19.ver vers19.dsym ""
     881
     882build_vers_lib_no_pic "vers20a" vers20.c vers20a "" vers20.map vers20a.ver vers20.dsym ""
     883exec cp $tmpdir/vers20a.so $tmpdir/vers20b.so
     884build_vers_lib_no_pic "vers20" vers20.c vers20 "vers20a.so vers20b.so" vers20.map vers20.ver vers20.dsym ""
     885
     886# Test .symver override.
     887build_vers_lib_no_pic "vers21" vers21.c vers21 "" vers21.map vers21.ver vers21.dsym vers21.sym
     888
     889# Test moving default definition from one DSO to another.
     890build_vers_lib_no_pic "vers22a" vers22a.c vers22a "" vers22.map vers22a.ver vers22a.dsym vers22a.sym
     891build_vers_lib_no_pic "vers22b" vers22b.c vers22b "" vers22.map vers22b.ver vers22b.dsym ""
     892build_vers_lib_no_pic "vers22" vers22.c vers22 "vers22a.so vers22b.so" "" vers22.ver vers22.dsym ""
     893
     894# Test versioned definitions in different files.
     895build_vers_lib_no_pic "vers23a" vers23a.c vers23a "" vers23a.map vers23a.ver vers23a.dsym vers23a.sym
     896build_vers_lib_no_pic "vers23b" vers23b.c vers23b "" vers23b.map vers23b.ver vers23b.dsym ""
     897build_vers_lib_no_pic "vers23c" vers23b.c vers23c "vers23a.so" vers23b.map vers23c.ver vers23b.dsym ""
     898build_exec "vers23d" vers23.c vers23d "tmpdir/vers23a.so tmpdir/vers23c.so" "" vers23.ver vers23d.dsym ""
     899build_exec "vers23" vers23.c vers23 "tmpdir/vers23a.so tmpdir/vers23b.o tmpdir/vers23b.so" "" vers23.ver vers23.dsym ""
     900
     901# Test .symver x,x@VERS.0
     902set as_pic_flags ""
     903if [istarget sparc*-*-*] {
     904  set as_pic_flags "-K PIC"
     905}
     906run_ld_link_tests [list "\"vers24a\"
     907                         \"-shared --version-script $srcdir/$subdir/vers24.map\"
     908                         \"$as_pic_flags\" {vers24a.c vers24b.c} { { readelf -Wrs vers24.rd } }
     909                         \"libvers24a.so\" \"-fpic\""]
     910run_ld_link_tests [list "\"vers24b\"
     911                         \"-shared --version-script $srcdir/$subdir/vers24.map\"
     912                         \"$as_pic_flags\" {vers24b.c vers24a.c} { { readelf -Wrs vers24.rd } }
     913                         \"libvers24b.so\" \"-fpic\""]
     914run_ld_link_tests [list "\"vers24c\"
     915                         \"-shared --version-script $srcdir/$subdir/vers24.map\"
     916                         \"$as_pic_flags\" {vers24c.c} { { readelf -Wrs vers24.rd } }
     917                         \"libvers24c.so\" \"-fpic\""]
     918
     919# Test versioned definition vs. normal definition in different files.
     920build_vers_lib_no_pic "vers25a" vers25a.c vers25a "" vers25a.map vers25a.ver vers25a.dsym ""
     921build_vers_lib_no_pic "vers25b1" vers25b.c vers25b1 "vers25a.o vers25a.so" "" vers25b.ver vers25b.dsym ""
     922build_vers_lib_no_pic "vers25b2" vers25b.c vers25b2 "vers25a.so vers25a.o" "" vers25b.ver vers25b.dsym ""
     923build_vers_lib_pic "vers26a" vers26a.c vers26a "" vers26a.map vers26a.ver vers26a.dsym ""
     924build_vers_lib_pic "vers26b1" vers26b.c vers26b1 "" "" vers26b.ver vers26b.dsym ""
     925build_vers_lib_pic "vers26b2" vers26b.c vers26b2 "vers26a.so vers26b1.so vers26a.o" "" vers26b.ver vers26b.dsym ""
     926if [istarget x86_64-*-linux*] {
     927    # x86_64 doesn't like non-pic shared libraries
     928    xfail "vers26b3"
     929} else {
     930    build_vers_lib_no_pic "vers26b3" vers26b.c vers26b3 "vers26a.so vers26b1.so vers26a.o" "" vers26b.ver vers26b.dsym ""
     931}
     932
     933# Test versioned definition vs. hidden definition in different files.
     934build_vers_lib_no_pic "vers27a" vers27a.c vers27a "" vers27a.map vers27a.ver vers27a.dsym ""
     935build_vers_lib_no_pic "vers27b" vers27b.c vers27b "" "" vers27b.ver vers27b.dsym ""
     936build_vers_lib_no_pic "vers27c1" vers27c.c vers27c1 "vers27b.o vers27a.so" "" vers27c.ver vers27c.dsym ""
     937build_vers_lib_no_pic "vers27c2" vers27c.c vers27c2 "vers27a.so vers27b.o" "" vers27c.ver vers27c.dsym ""
     938build_vers_lib_pic "vers27d1" vers27d1.c vers27d1 "" vers27a.map vers27d.ver vers27d.dsym vers27d.sym
     939build_vers_lib_pic "vers27d2" vers27d2.c vers27d2 "" "" vers27b.ver vers27b.dsym ""
     940build_executable "vers27d3" vers27d3.c vers27d3 "vers27b.o vers27d2.so vers27d1.so" "" vers27b.ver vers27b.dsym ""
     941build_vers_lib_pic "vers27d4" vers27d2.c vers27d4 "vers27a.so" "" vers27d4.ver vers27d4.dsym ""
     942build_executable "vers27d5" vers27d3.c vers27d5 "vers27d4.so vers27b.o vers27a.so" "" vers27b.ver vers27b.dsym ""
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers1.map

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11VERS_1.1 {
    2          global:
    3                  foo1;
    42         local:
    53                 hide_old*;
     
    97
    108VERS_1.2 {
    11                  foo2;
    129} VERS_1.1;
    1310
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers1.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x0a26881f tmpdir/vers1.so
     21 0x01 0x0c96425f vers1.so
    332 0x00 0x0a7927b1 VERS_1.1
    443 0x00 0x0a7927b2 VERS_1.2
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers15.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x0d8a2605 tmpdir/vers15
     21 0x01 0x07cc9645 vers15
    332 0x00 0x0a7927b2 VERS_1.2
    443 0x00 0x0a7927b1 VERS_1.1
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers16a.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x0601cfbf tmpdir/vers16a.so
     21 0x01 0x064c090f vers16a.so
    332 0x00 0x0a7927b1 VERS_1.1
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers17.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x02605d3f tmpdir/vers17.so
     21 0x01 0x0964f95f vers17.so
    332 0x00 0x0a7922b0 VERS_2.0
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers18.dsym

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 [0-9a-f]*  w   DF (\*UND\*)     [0-9a-f]*  VERS_2.0    (0x[0-9a-f][0-9a-f] )?show_foo
    21[0]* g    DO \*ABS\*    [0]*  VERS_1.1    VERS_1.1
    32[0]* g    DO \*ABS\*    [0]*  VERS_1.2    VERS_1.2
     
    65[0-9a-f]*  w   DF (.text|\*ABS\*)       [0-9a-f]* \(VERS_1.1\)   (0x[0-9a-f][0-9a-f] )?show_foo
    76[0-9a-f]*  w   DF (.text|\*ABS\*)       [0-9a-f]* \(VERS_1.2\)   (0x[0-9a-f][0-9a-f] )?show_foo
     7[0-9a-f]*  w   DF (.text|\*ABS\*)       [0-9a-f]*  VERS_2.0    (0x[0-9a-f][0-9a-f] )?show_foo
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers18.map

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11VERS_1.1 {
    2          global:
    3                  foo1;
    42         local:
    53                 hide_old*;
     
    97
    108VERS_1.2 {
    11                  foo2;
    129} VERS_1.1;
    1310
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers18.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x02608d3f tmpdir/vers18.so
     21 0x01 0x0964e95f vers18.so
    332 0x00 0x0a7927b1 VERS_1.1
    443 0x00 0x0a7927b2 VERS_1.2
    55        VERS_1.1
    6 4 0x02 0x0a7922b0 VERS_2.0
     64 0x00 0x0a7922b0 VERS_2.0
    77        VERS_1.2
    8 
    9 Version References:
    10   required from tmpdir/vers17.so:
    11     0x0a7922b0 0x00 05 VERS_2.0
    12 
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers19.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version References:
    2   required from *tmpdir/vers17.so:
    3     0x0a7922b0 0x00 02 VERS_2.0
     2  required from tmpdir/vers18.so:
     3    0x0a7922b0 0x00 0[23] VERS_2.0
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers2.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x0a26181f tmpdir/vers2.so
     21 0x01 0x0c96525f vers2.so
    332 0x00 0x08785b51 VERS_XXX_1.1
    44
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers3.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version References:
    22  required from tmpdir/vers1.so:
    3     0x0a7922b0 0x00 02 VERS_2.0
     3    0x0a7922b0 0x00 0[23] VERS_2.0
    44
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers4a.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x0d8a26e1 tmpdir/vers4a
     21 0x01 0x07cc96a1 vers4a
    332 0x00 0x0a7922b0 VERS_2.0
    44
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers7a.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x0269fd3f tmpdir/vers7a.so
     21 0x01 0x096d595f vers7a.so
    332 0x00 0x05aa7921 VERS_1
    44
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers8.map

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11VERSION {
    22        VERS_1.1 {
    3                  global:
    4                          foo1;
    53                 local:
    64                         hide_old*;
     
    108       
    119        VERS_1.2 {
    12                          foo2;
    1310        } VERS_1.1;
    1411       
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers8.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x0a26f81f tmpdir/vers8.so
     21 0x01 0x0c96b25f vers8.so
    332 0x00 0x0a7927b1 VERS_1.1
    443 0x00 0x0a7927b2 VERS_1.2
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvers/vers9.ver

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11Version definitions:
    2 1 0x01 0x04d8a269 tmpdir/vers9
     21 0x01 0x007cc969 vers9
    332 0x00 0x0a7927b1 VERS_1.1
    443 0x00 0x0a7927b2 VERS_1.2
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvsb/elf-offset.ld

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    5959  .rel.plt       : { *(.rel.plt)                }
    6060  .rela.plt      : { *(.rela.plt)               }
     61  .rel.eh_frame  : { *(.rel.eh_frame)           }
     62  .rela.eh_frame : { *(.rela.eh_frame)          }
    6163  .init          : { KEEP (*(.init))    }
    6264  .plt      : { *(.plt) }
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvsb/elfvsb.dat

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2121visibility_checkvarptr () == 1
    2222main_visibility_checkvar () == 1
     23main_visibility_checkcom () == 1
     24shlib_visibility_checkcom () == 1
     25main_visibility_checkweak () == 1
     26shlib_visibility_checkweak () == 1
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvsb/elfvsb.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11# Expect script for ld-visibility tests
    2 #   Copyright 2000, 2001 Free Software Foundation, Inc.
     2#   Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
    33#
    44# This file is free software; you can redistribute it and/or modify
     
    2222# Make sure that ld can generate ELF shared libraries with visibility.
    2323
    24 # This test can only be run if ld generates native executables.
    25 if ![isnative] then {return}
    26 
    2724# This test can only be run on a couple of ELF platforms.
    2825# Square bracket expressions seem to confuse istarget.
    29 if { ![istarget i?86-*-linux*] \
     26if { ![istarget hppa*64*-*-hpux*] \
     27     && ![istarget hppa*-*-linux*] \
     28     && ![istarget i?86-*-linux*] \
    3029     && ![istarget ia64-*-linux*] \
    3130     && ![istarget m68k-*-linux*] \
     
    3433     && ![istarget arm*-*-linux*] \
    3534     && ![istarget alpha*-*-linux*] \
    36      && ![istarget sparc*-*-linux*] } {
     35     && ![istarget sparc*-*-linux*] \
     36     && ![istarget s390*-*-linux*] \
     37     && ![istarget sh\[34\]*-*-linux*] \
     38     && ![istarget x86_64-*-linux*] } {
    3739    return
    3840}
     
    4244    return
    4345}
     46
     47set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
     48foreach t $test_list {
     49    # We need to strip the ".d", but can leave the dirname.
     50    verbose [file rootname $t]
     51    run_dump_test [file rootname $t]
     52}
     53
     54# The remaining tests can only be run if ld generates native executables.
     55if ![isnative] then {return}
    4456
    4557set tmpdir tmpdir
     
    134146        } else { if { [ string match $visibility "hidden_undef_def" ]
    135147             && [regexp ".*/main.c.*: undefined reference to \`visibility\'" $link_output]
     148             && [regexp ".*/main.c.*: undefined reference to \`visibility_def\'" $link_output]
     149             && [regexp ".*/main.c.*: undefined reference to \`visibility_func\'" $link_output]
    136150             && [regexp ".*/main.c.*: undefined reference to \`visibility_var\'" $link_output] } {
    137151            pass "$testname"
     
    238252                setup_xfail "powerpc-*-linux*"
    239253            }
     254
     255            # Non-pic code uses name binding rules for applications to
     256            # reference variables by gp-relative relocs, which can't be
     257            # used with overridable symbols.
    240258            if { ![ string match $visibility "hidden_undef" ]
    241259                 && ![ string match $visibility "protected_undef" ] } {
    242260                setup_xfail "ia64-*-linux*"
    243             }
     261                setup_xfail "alpha*-*-linux*"
     262            }
     263            if { ![ string match $visibility "hidden" ]
     264                 && ![ string match $visibility "hidden_undef" ]
     265                 && ![ string match $visibility "hidden_undef_def" ]
     266                 && ![ string match $visibility "protected_undef" ] } {
     267                setup_xfail "s390x-*-linux*"
     268            }
     269            setup_xfail "x86_64-*-linux*"
     270
    244271            visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb
    245272
     
    268295                 && ![ string match $visibility "protected_undef" ] } {
    269296                setup_xfail "ia64-*-linux*"
     297                setup_xfail "alpha*-*-linux*"
    270298                setup_xfail "mips*-*-linux*"
    271299            }
     300            setup_xfail "x86_64-*-linux*"
    272301            visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \
    273302                mainnp.o sh1np.o sh2np.o elfvsb \
     
    324353                     && ![ string match $visibility "protected_undef" ] } {
    325354                    setup_xfail "ia64-*-linux*"
    326                 }
     355                    setup_xfail "alpha*-*-linux*"
     356                }
     357                if { ![ string match $visibility "hidden" ]
     358                     && ![ string match $visibility "hidden_undef" ]
     359                     && ![ string match $visibility "hidden_undef_def" ]
     360                     && ![ string match $visibility "protected_undef" ] } {
     361                    setup_xfail "s390x-*-linux*"
     362                }
     363                setup_xfail "x86_64-*-linux*"
    327364                visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb
    328365            }
     
    384421visibility_run normal
    385422
     423if { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/common.c tmpdir/common.o] } {
     424    unresolved "common hidden symbol"
     425} else {
     426    if ![ld_simple_link $ld tmpdir/common "tmpdir/common.o"] {
     427        fail "common hidden symbol"
     428    } else {
     429        pass "common hidden symbol"
     430    }
     431}
     432
     433if { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } {
     434    unresolved "weak hidden symbol"
     435} else {
     436   if { ![ld_compile "$CC -g $CFLAGS $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } {
     437        unresolved "weak hidden symbol"
     438    } else {
     439        if ![ld_simple_link $ld tmpdir/sh3.so "-shared tmpdir/sh3.o"] {
     440            fail "weak hidden symbol"
     441        } else {
     442            if ![ld_simple_link $ld tmpdir/weak "tmpdir/test.o tmpdir/sh3.o"] {
     443                fail "weak hidden symbol DSO last"
     444            } else {
     445                pass "weak hidden symbol DSO last"
     446            }
     447            if ![ld_simple_link $ld tmpdir/weak "tmpdir/sh3.so tmpdir/test.o"] {
     448                fail "weak hidden symbol DSO first"
     449            } else {
     450                pass "weak hidden symbol DSO first"
     451            }
     452        }
     453    }
     454}
     455
    386456if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
    387457    # Remove the temporary directory.
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvsb/main.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    4343extern int visibility_varval ();
    4444extern void *visibility_varptr ();
     45extern int shlib_visibility_checkcom ();
     46extern int shlib_visibility_checkweak ();
     47
     48int shlib_visibility_com = 1;
     49
     50int shlib_visibility_var_weak = 1;
     51
     52int
     53shlib_visibility_func_weak ()
     54{
     55  return 1;
     56}
    4557
    4658#ifdef HIDDEN_WEAK_TEST
     
    8294         && visibility_varptr () != &visibility_var;
    8395}
     96
     97#ifndef PROTECTED_UNDEF_TEST
     98int shared_data = 1;
     99asm (".protected shared_data");
     100
     101int
     102shared_func ()
     103{
     104  return 1;
     105}
     106
     107asm (".protected shared_func");
     108
     109extern int * shared_data_p ();
     110typedef int (*func) ();
     111extern func shared_func_p ();
     112#endif
    84113#else
    85114static int
     
    122151}
    123152
     153#ifdef HIDDEN_NORMAL_TEST
     154int visibility_com;
     155asm (".hidden visibility_com");
     156
     157int
     158main_visibility_checkcom ()
     159{
     160  return visibility_com == 0;
     161}
     162
     163int
     164main_visibility_checkweak ()
     165{
     166  return 1;
     167}
     168#elif defined (HIDDEN_UNDEF_TEST)
     169extern int visibility_def;
     170asm (".hidden visibility_def");
     171extern int visibility_func ();
     172asm (".hidden visibility_func");
     173
     174int
     175main_visibility_checkcom ()
     176{
     177  return &visibility_def != NULL;
     178}
     179
     180int
     181main_visibility_checkweak ()
     182{
     183  return &visibility_func != NULL;
     184}
     185#else
     186int
     187main_visibility_checkcom ()
     188{
     189  return 1;
     190}
     191
     192int
     193main_visibility_checkweak ()
     194{
     195  return 1;
     196}
     197#endif
     198
    124199int
    125200main ()
    126201{
    127202  int (*p) ();
     203  int ret = 0;
    128204
    129205  printf ("mainvar == %d\n", mainvar);
     
    174250  printf ("main_visibility_checkvar () == %d\n",
    175251          main_visibility_checkvar ());
    176   return 0;
    177 }
    178 #endif
     252  printf ("main_visibility_checkcom () == %d\n",
     253          main_visibility_checkcom ());
     254  printf ("shlib_visibility_checkcom () == %d\n",
     255          shlib_visibility_checkcom ());
     256  printf ("main_visibility_checkweak () == %d\n",
     257          main_visibility_checkweak ());
     258  printf ("shlib_visibility_checkweak () == %d\n",
     259          shlib_visibility_checkweak ());
     260
     261#if !defined (PROTECTED_UNDEF_TEST) && defined (PROTECTED_TEST)
     262  if (&shared_data != shared_data_p ())
     263    ret = 1;
     264  p = shared_func_p ();
     265  if (shared_func != p)
     266    ret = 1;
     267  if (shared_data != *shared_data_p ())
     268    ret = 1;
     269  if (shared_func () != (*p) () )
     270    ret = 1;
     271#endif
     272
     273  return ret;
     274}
     275#endif
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvsb/sh1.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    181181
    182182#if defined (HIDDEN_UNDEF_TEST) || defined (PROTECTED_UNDEF_TEST)
     183#ifdef WEAK_TEST
     184#pragma weak visibility
     185#endif
    183186extern int visibility ();
    184187#else
     
    244247
    245248#if defined (HIDDEN_UNDEF_TEST) || defined (PROTECTED_UNDEF_TEST)
     249#ifdef WEAK_TEST
     250#pragma weak visibility_var
     251#endif
    246252extern int visibility_var;
    247253#else
     
    319325#endif
    320326
    321 #ifdef WEAK_TEST
    322 asm (".weak visibility");
    323 asm (".weak visibility_var");
    324 #endif
     327#ifdef HIDDEN_NORMAL_TEST
     328int shlib_visibility_com;
     329asm (".hidden shlib_visibility_com");
     330
     331int
     332shlib_visibility_checkcom ()
     333{
     334  return shlib_visibility_com == 0;
     335}
     336
     337int
     338shlib_visibility_checkweak ()
     339{
     340  return 1;
     341}
     342#else
     343int
     344shlib_visibility_checkcom ()
     345{
     346  return 1;
     347}
     348
     349int
     350shlib_visibility_checkweak ()
     351{
     352  return 1;
     353}
     354#endif
     355
     356#ifdef PROTECTED_TEST
     357int shared_data = 100;
     358 
     359int *
     360shared_data_p ()
     361{
     362  return &shared_data;
     363}
     364 
     365int
     366shared_func ()
     367{
     368  return 100;
     369}
     370 
     371void *
     372shared_func_p ()
     373{
     374  return shared_func;
     375}
     376#endif
  • branches/GNU/src/binutils/ld/testsuite/ld-elfvsb/sh2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    55   the shared library.  */
    66int shlibvar2 = 4;
     7
     8/* This variable is defined here, and shouldn't be used to resolve a
     9   reference with non-default visibility in another shared library.  */
     10int visibility_com = 2;
    711
    812/* This function is called by another file in the shared library.  */
     
    2226
    2327int visibility_var = 2;
     28
     29int visibility_def = 2;
     30
     31int
     32visibility_func ()
     33{
     34  return 2;
     35}
    2436#endif
     37
     38#ifdef HIDDEN_WEAK_TEST
     39int visibility_var_weak = 2;
     40
     41int
     42visibility_func_weak ()
     43{
     44  return 2;
     45}
     46#endif
  • branches/GNU/src/binutils/ld/testsuite/ld-empic/empic.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    6161
    6262    # Get the symbol table.
    63     if ![ld_nm $nm tmpdir/relax] {
     63    if ![ld_nm $nm "" tmpdir/relax] {
    6464        unresolved $testname
    6565        return
  • branches/GNU/src/binutils/ld/testsuite/ld-scripts/cross1.t

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    22SECTIONS
    33{
     4  .dynsym : { *(.dynsym) }
     5  .dynstr : { *(.dynstr) }
     6  .hash : { *(.hash) }
     7  .toc  : { *(.toc) }
     8  .opd  : { *(.opd) }
    49  .text : { tmpdir/cross1.o }
    510  .data : { tmpdir/cross2.o }
  • branches/GNU/src/binutils/ld/testsuite/ld-scripts/cross2.t

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    33{
    44  .text : { *(.text) *(.text.*) *(.pr) }
    5   .data : { *(.data) *(.data.*) *(.sdata) *(.rw) *(.tc0) *(.tc) }
     5  .data : { *(.data) *(.data.*) *(.sdata) *(.rw) *(.tc0) *(.tc) *(.toc) }
    66}
  • branches/GNU/src/binutils/ld/testsuite/ld-scripts/crossref.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2727}
    2828
     29# Xtensa targets currently default to putting literal values in a separate
     30# section and that requires linker script support, so put literals in text.
     31global CFLAGS
     32if [istarget xtensa*-*-*] {
     33    set CFLAGS "$CFLAGS -mtext-section-literals"
     34}
     35
    2936if { ![ld_compile $CC "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
    3037     || ![ld_compile $CC "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
     
    4350}
    4451
     52if [istarget sh64*-*-elf] {
     53    # This is what gcc passes to ld by default.
     54    set flags "-mshelf32"
     55}
     56
    4557verbose -log "$ld $flags -o tmpdir/cross1 -T $srcdir/$subdir/cross1.t tmpdir/cross1.o tmpdir/cross2.o"
    4658
     
    5567} else {
    5668    verbose -log "$exec_output"
    57     if [regexp "prohibited cross reference from .* to `foo' in" $exec_output] {
     69    if [regexp "prohibited cross reference from .* to `.*foo' in" $exec_output] {
    5870        pass $test1
    5971    } else {
  • branches/GNU/src/binutils/ld/testsuite/ld-scripts/defined.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2929    fail $testname
    3030} else {
    31     if ![ld_nm $nm tmpdir/def] {
     31    if ![ld_nm $nm "" tmpdir/def] {
    3232        unresolved $testname
    3333    } else {
  • branches/GNU/src/binutils/ld/testsuite/ld-scripts/phdrs.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2323     && ![istarget *-*-elf*] \
    2424     && ![istarget *-*-eabi*] \
     25     && ![istarget hppa*64*-*-hpux*] \
    2526     && ![istarget *-*-linux*] \
    2627     && ![istarget *-*-irix5*] \
     
    5051if { [istarget alpha*-*-*] || [istarget "ia64*-*-*"]
    5152    || [istarget "hppa*64*-*-*"] || [istarget "x86_64*-*-*"]
    52     || [istarget "s390x*-*-*"] || [istarget "sparc64*-*-*"]} then {
     53    || [istarget "s390x*-*-*"] || [istarget "sparc64*-*-*"]
     54    || [istarget "powerpc64*-*-*"] || [istarget "*-*-*elf64*"] } then {
    5355  set phdrs_regexp \
    5456".*Program Header:.*PHDR *off *0x00*40 *vaddr *0x00*800040 *paddr *0x00*800040.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* flags r--.*LOAD *off *0x00* *vaddr *0x00*800000 *paddr *0x00*800000.*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-.*"
  • branches/GNU/src/binutils/ld/testsuite/ld-scripts/script.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    3030    global nm_output
    3131
    32     if ![ld_nm $nm tmpdir/script] {
     32    if ![ld_nm $nm "" tmpdir/script] {
    3333        unresolved $testname
    3434    } else {
     
    4343            set text_end 0x104
    4444            set data_end 0x1004
     45            if [istarget *c4x*-*-*] then {
     46                set text_end 0x101
     47                set data_end 0x1001
     48            }
    4549            if [istarget *c54x*-*-*] then {
    4650                set text_end 0x102
  • branches/GNU/src/binutils/ld/testsuite/ld-scripts/sizeof.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    3131}
    3232
    33 if ![ld_nm $nm tmpdir/sizeof] {
     33if ![ld_nm $nm "" tmpdir/sizeof] {
    3434    unresolved $testname
    3535    return
  • branches/GNU/src/binutils/ld/testsuite/ld-scripts/weak.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2222# This test only works for ELF targets.  It ought to work for some
    2323# a.out targets, but it doesn't.
    24 
    25 if { ![istarget *-*-sysv4*] \
    26      && ![istarget *-*-unixware*] \
    27      && ![istarget *-*-elf*] \
    28      && ![istarget *-*-eabi*] \
    29      && ![istarget *-*-linux*] \
    30      && ![istarget *-*-irix5*] \
    31      && ![istarget *-*-irix6*] \
    32      && ![istarget *-*-solaris2*] } then {
     24if ![is_elf_format] {
    3325    return
    3426}
    3527
    36 if { [istarget *-*-linux*aout*] \
    37      || [istarget *-*-linux*oldld*] } {
    38     return
    39 }
    4028
    4129if {! [ld_assemble $as $srcdir/$subdir/weak1.s tmpdir/weak1.o]
  • branches/GNU/src/binutils/ld/testsuite/ld-selective/3.cc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1515void B::foo() { }                       // keep
    1616
    17 void _start() __asm__("_start");        // keep
     17void _start() __asm__("_start"); // keep
     18void start() __asm__("start"); // some toolchains use this name.
    1819
    1920A a;                                    // keep
     
    3334}
    3435
     36void start ()
     37{
     38  _start ();
     39}
     40
    3541// In addition, keep A's virtual table.
    3642
  • branches/GNU/src/binutils/ld/testsuite/ld-selective/4.cc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1616
    1717void _start() __asm__("_start");        // keep
     18void start() __asm__("start"); // some toolchains use this name.
    1819
    1920A a;                                    // keep
     
    2627}
    2728
     29void start ()
     30{
     31  _start ();
     32}
     33
    2834extern "C" void __main() { }
  • branches/GNU/src/binutils/ld/testsuite/ld-selective/5.cc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1616
    1717void _start() __asm__("_start");        // keep
     18void start() __asm__("start"); // some toolchains use this name.
    1819
    1920A a;                                    // keep
     
    3031}
    3132
     33void start ()
     34{
     35  _start ();
     36}
     37
    3238extern "C" void __main() { }
  • branches/GNU/src/binutils/ld/testsuite/ld-selective/selective.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11# Expect script for LD selective linking tests
    2 #   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
     2#   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    33#
    44# This file is free software; you can redistribute it and/or modify
     
    66# the Free Software Foundation; either version 2 of the License, or
    77# (at your option) any later version.
    8 # 
     8#
    99# This program is distributed in the hope that it will be useful,
    1010# but WITHOUT ANY WARRANTY; without even the implied warranty of
    1111# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1212# GNU General Public License for more details.
    13 # 
     13#
    1414# You should have received a copy of the GNU General Public License
    1515# along with this program; if not, write to the Free Software
     
    2020
    2121
     22# AOUT based ports do not support selective linking
     23if {[istarget "*-*-*aout*"] \
     24    || [istarget "*-*-*bout*"] \
     25    || [istarget "vax-*-ultrix*"]} {
     26    return
     27}
     28
    2229# COFF based ports do not support selective linking
    2330if {[istarget "*-*-coff"]} {
     
    2835}
    2936
    30 # selective linking is not yet implemented for 68hc11/68hc12
    31 if {[istarget "m6811-*-*"] || [istarget "m6812-*-*"]} {
     37# Alpha does not support selective linking
     38if {[istarget "alpha*-*-*"]} {
     39    return
     40}
     41
     42# s390 does not support selective linking
     43if {[istarget "s390*-*-*"]} {
    3244    return
    3345}
     
    4456# FIXME: Instead of table, read settings from each source-file.
    4557set seltests {
    46   {selective1 C 1.c {} {} {dropme1 dropme2} {}}
    47   {selective2 C 2.c {} {} {foo} {mips*-*}}
    48   {selective3 C 2.c {-u foo} {foo} {{foo 0}} {mips*-*}}
    49   {selective4 C++ 3.cc {} {start foo__1A foo__1B} {bar__1A} {mips*-*}}
    50   {selective5 C++ 4.cc {} {} {foo__1B foo__1A} {mips*-*}}
    51   {selective6 C++ 5.cc {} {} {foo__1B foo__1A dropme1__Fv dropme2__Fv} {*-*-*}}
     58  {selective1 C   1.c  {}       {}    {dropme1 dropme2} {alpha*-*}}
     59  {selective2 C   2.c  {}       {}    {foo} {alpha*-* mips*-*}}
     60  {selective3 C   2.c  {-u foo} {foo} {{foo 0}} {mips*-*}}
     61  {selective4 C++ 3.cc {}       {start a A::foo() B::foo()} {A::bar()} {alpha*-*  mips*-*}}
     62  {selective5 C++ 4.cc {}       {start a A::bar()} {A::foo() B::foo()} {alpha*-*  mips*-*}}
     63  {selective6 C++ 5.cc {}       {start a A::bar()}
     64    {A::foo() B::foo() dropme1() dropme2()} {*-*-*}}
    5265}
    5366
     
    5568set cxxflags "-fvtable-gc -fno-exceptions -fno-rtti"
    5669set ldflags "--gc-sections -Bstatic"
     70
     71if [istarget sh64*-*-elf] {
     72    # This is what gcc passes to ld by default, plus switch to the
     73    # "usual" ELF _start (shelf32 normally uses just `start' for COFF
     74    # compatibility)
     75    set ldflags "-e _start -mshelf32 $ldflags"
     76}
    5777
    5878# If we don't have g++ for the target, mark all tests as untested.
     
    93113    if { ![ld_compile "$CC $testflags" $srcdir/$subdir/$testfile $objfile] } {
    94114        unresolved $testname
    95         return
     115        continue
    96116    }
    97117
    98118    # V850 targets need libgcc.a
     119    # FIXME: This does not work with installed toolchains!
    99120    if [istarget v850*-*-elf] {
    100121        set objfile "$objfile -L ../gcc -lgcc"
    101122    }
    102    
     123
     124    # ARM targets need libgcc.a in THUMB mode so that __call_via_r3 is provided
     125    # FIXME: This does not work with installed toolchains!
     126    if {[istarget arm-*-*] || [istarget xscale-*-*]} {
     127        set objfile "$objfile -L ../gcc -lgcc"
     128    }
     129
     130    # HPPA linux targets need libgcc.a for millicode routines ($$dyncall).
     131    if [istarget hppa*-*-linux*] {
     132        catch "exec $CC -print-libgcc-file-name" libgcc
     133        set objfile "$objfile $libgcc"
     134    }
     135
    103136    # m6811/m6812 code has references to soft registers.
    104137    if {[istarget m6811-*-*] || [istarget m6812-*-*]} {
     
    112145    }
    113146
    114     if ![ld_nm $nm $ldfile] {
     147    if ![ld_nm $nm --demangle $ldfile] {
    115148        unresolved $testname
    116149        continue
    117150    }
    118151
    119     # Check each mandated symbol and optionally mandated values.
     152    # Must make V2 demangled names look like V3
     153    foreach nm_output_key [array names nm_output] {
     154        if [regsub \\(void\\) $nm_output_key () new_nm_output_key] {
     155            set nm_output($new_nm_output_key) nm_output($nm_output_key)
     156        }
     157    }
     158
     159    # Check each mandated symbol and optionally mandated values.
    120160    foreach mustsym $mustsyms {
    121161        if { [llength [concat $mustsym]] == 1 } {
     
    177217    }
    178218}
    179 
  • branches/GNU/src/binutils/ld/testsuite/ld-sh/sh.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2626}
    2727
     28if { ([istarget sh64-*-elf]
     29      || [istarget sh64*-*-linux*])} {
     30    # relaxing not supported on sh64 yet.
     31    return
     32}
     33
    2834set testsimple "SH simple relaxing"
    2935
     
    3339    fail $testsimple
    3440} else {
    35     if ![ld_nm $nm tmpdir/sh1] {
     41    if ![ld_nm $nm "" tmpdir/sh1] {
    3642        unresolved $testsimple
    3743    } else {
     
    5763set testsrec "SH relaxing to S-records"
    5864
    59 if ![ld_simple_link $ld tmpdir/sh1.s1 "-relax --oformat srec tmpdir/sh1.o"] {
     65if [istarget sh*-linux-gnu] {
     66    # This target needs the explicit entry address.
     67    catch "exec $objdump -x tmpdir/sh1 | grep start\\ address | sed s/start\\ address//" entry_addr
     68    set srec_relax_arg "-Ttext $entry_addr -relax --oformat srec tmpdir/sh1.o"
     69} else {
     70    set srec_relax_arg "-relax --oformat srec tmpdir/sh1.o"
     71}
     72if ![ld_simple_link $ld tmpdir/sh1.s1 $srec_relax_arg ] {
    6073    fail $testsrec
    6174} else {
     
    105118}
    106119
    107 if {![ld_assemble $as "-relax $srcdir/$subdir/start.s" tmpdir/start.o] \
    108      || ![ld_compile $CC "-O -mrelax $srcdir/$subdir/sh2.c" tmpdir/sh2.o]} {
     120if [istarget sh*-linux-gnu] {
     121    exec sed -e s/_main/main/ -e s/_trap/trap/ -e s/_stack/stack/ \
     122            < $srcdir/$subdir/start.s >tmpdir/start.s
     123} else {
     124    exec cp $srcdir/$subdir/start.s tmpdir/start.s
     125}
     126
     127if {![ld_assemble $as "-relax tmpdir/start.s" tmpdir/start.o] \
     128    || ![ld_compile $CC "-O -mrelax $srcdir/$subdir/sh2.c" tmpdir/sh2.o]} {
    109129    unresolved $testlink
    110130    unresolved $testjsr
  • branches/GNU/src/binutils/ld/testsuite/ld-shared/elf-offset.ld

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    5959  .rel.plt       : { *(.rel.plt)                }
    6060  .rela.plt      : { *(.rela.plt)               }
     61  .rel.eh_frame  : { *(.rel.eh_frame)           }
     62  .rela.eh_frame : { *(.rela.eh_frame)          }
    6163  .init          : { KEEP (*(.init))    }
    6264  .plt      : { *(.plt) }
  • branches/GNU/src/binutils/ld/testsuite/ld-shared/shared.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11# Expect script for ld-shared tests
    2 #   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     2#   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
    33#   Free Software Foundation, Inc.
    44#
     
    2929# This test can only be run on a couple of ELF platforms.
    3030# Square bracket expressions seem to confuse istarget.
    31 if { ![istarget i?86-*-sysv4*] \
     31if { ![istarget hppa*64*-*-hpux*] \
     32     && ![istarget hppa*-*-linux*] \
     33     && ![istarget i?86-*-sysv4*] \
    3234     && ![istarget i?86-*-unixware] \
    3335     && ![istarget i?86-*-elf*] \
     
    4850     && ![istarget alpha*-*-linux*] \
    4951     && ![istarget rs6000*-*-aix*] \
    50      && ![istarget powerpc*-*-aix*] } {
     52     && ![istarget powerpc*-*-aix*] \
     53     && ![istarget s390*-*-linux*] \
     54     && ![istarget x86_64-*-linux*] } {
    5155    return
    5256}
     
    196200        setup_xfail "*-*-sunos4*"
    197201        setup_xfail "ia64-*-linux*"
     202        setup_xfail "alpha*-*-linux*"
     203        setup_xfail "x86_64-*-linux*"
     204        setup_xfail "s390x-*-linux*"
    198205        shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
    199206
     
    206213        setup_xfail "powerpc-*-linux*"
    207214        setup_xfail "ia64-*-linux*"
     215        setup_xfail "alpha*-*-linux*"
    208216        setup_xfail "mips*-*-linux*"
     217        setup_xfail "x86_64-*-linux*"
    209218        shared_test shnp "shared (non PIC, load offset)" \
    210219                mainnp.o sh1np.o sh2np.o shared \
     
    247256            setup_xfail "*-*-sunos4*"
    248257            setup_xfail "ia64-*-linux*"
     258            setup_xfail "alpha*-*-linux*"
     259            setup_xfail "x86_64-*-linux*"
     260            setup_xfail "s390x-*-linux*"
    249261            shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
    250262        }
  • branches/GNU/src/binutils/ld/testsuite/ld-srec/sr3.cc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    117117  foos--;
    118118}
     119
     120void *__dso_handle;
     121
     122extern "C"
     123int
     124__cxa_atexit (void)
     125{
     126  return 0;
     127}
  • branches/GNU/src/binutils/ld/testsuite/ld-srec/srec.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11# Test linking directly to S-records.
    22# By Ian Lance Taylor, Cygnus Support.
    3 #   Copyright 2001
     3#   Copyright 2001, 2002, 2003
    44#   Free Software Foundation, Inc.
    55#
     
    226226    global host_triplet
    227227
    228     set flags ""
     228    # Tell the ELF linker to not do anything clever with .eh_frame.
     229    set flags "--traditional-format"
    229230
    230231    # If the linker script uses SIZEOF_HEADERS, use a -Ttext argument
     
    242243    if [istarget a29k*-*-*] {
    243244        set flags "$flags --defsym V_SPILL=0 --defsym V_FILL=0"
     245    }
     246
     247    if [istarget sh64*-*-elf] {
     248        # This is what gcc passes to ld by default.
     249        set flags "-mshelf32"
     250        # SH64 targets cannot convert format in the linker
     251        # using the -oformat command line switch.
     252        setup_xfail "sh64*-*-*"
    244253    }
    245254
     
    280289        set objs "$objs -L ../gcc -lgcc"
    281290    }
     291
     292    # Xtensa ELF targets relax by default; S-Record linker does not
     293    if [istarget xtensa*-*-*] {
     294        set flags "$flags -no-relax"
     295    }
    282296   
    283297    if { ![ld_simple_link $ld tmpdir/sr1 "$flags $objs"] \
    284298         || ![ld_simple_link $ld tmpdir/sr2.sr "$flags --oformat srec $objs"] } {
     299        # PowerPc64 srec linker can't handle .toc relocations.
     300        setup_xfail "powerpc64*-*-*"
     301        setup_xfail "powerpc*-*-*64*"
    285302        setup_xfail "hppa*-*-*elf*"
    286303        fail $test
     
    360377
    361378# The S-record linker doesn't build special EABI sections.
    362 setup_xfail "powerpc*-*-eabi*"
     379# setup_xfail "powerpc*-*-eabi*"
    363380
    364381# The S-record linker doesn't include the .{zda} sections.
     
    388405}
    389406
    390 if ![ld_compile "$CXX $CXXFLAGS -fgnu-linker" $srcdir/$subdir/sr3.cc tmpdir/sr3.o] {
     407if ![ld_compile "$CXX $CXXFLAGS -fgnu-linker -fno-exceptions" $srcdir/$subdir/sr3.cc tmpdir/sr3.o] {
    391408    unresolved $test2
    392409    return
  • branches/GNU/src/binutils/ld/testsuite/ld-undefined/undefined.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    6262}
    6363
    64 set mu "undefined reference to `this_function_is_not_defined'"
     64set mu "undefined reference to `*this_function_is_not_defined'"
    6565checkund $mu $testund
    6666
     
    7575# With dwarf-2, we can't get the function in which the reference
    7676# occurs; see below.
     77setup_xfail "alpha*-*-linux*"
    7778setup_xfail "hppa*64*-*-*"
    7879setup_xfail "mn10300-*-elf"
    7980setup_xfail "sh-*-*"
    8081
    81 set mf "tmpdir/undefined.o: In function `function':"
     82set mf "tmpdir/undefined.o* In function `function':"
    8283checkund $mf $testfn
    8384
     
    9596setup_xfail "hppa*-*-*elf*"
    9697
    97 set ml "undefined.c:9: undefined reference to `this_function_is_not_defined'"
     98set ml "undefined.c:9: undefined reference to `*this_function_is_not_defined'"
    9899# With targets that use elf/dwarf2, such as the arm-elf and thumb-elf
    99100# toolchains, the code in bfd/elf.c:_bfd_elf_find_nearest_line() is called
     
    135136setup_xfail mcore-*-elf
    136137setup_xfail mips-sgi-irix6*
     138setup_xfail "sh64-*-*"
     139
     140# The undefined test fails on 31 bit s/390 because the address of the
     141# function `this_function_is_not_defined' is stored in the literal pool of
     142# the function. Therefore the line number in the error message is 8 instead
     143# of 9. On 64 bit s/390 this works because of the new brasl instruction that
     144# doesn't need a literal pool entry.
     145setup_xfail s390-*-*
    137146
    138147checkund $ml $testline
  • branches/GNU/src/binutils/ld/testsuite/ld-undefined/weak-undef.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2626     && ![istarget *-*-elf*] \
    2727     && ![istarget *-*-eabi*] \
     28     && ![istarget hppa*64*-*-hpux*] \
    2829     && ![istarget *-*-linux*] \
    2930     && ![istarget *-*-irix5*] \
  • branches/GNU/src/binutils/ld/testsuite/lib/ld-lib.exp

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11# Support routines for LD testsuite.
    2 #   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     2#   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    33#   Free Software Foundation, Inc.
    44#
     
    77# the Free Software Foundation; either version 2 of the License, or
    88# (at your option) any later version.
    9 # 
     9#
    1010# This program is distributed in the hope that it will be useful,
    1111# but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313# GNU General Public License for more details.
    14 # 
     14#
    1515# You should have received a copy of the GNU General Public License
    1616# along with this program; if not, write to the Free Software
     
    1818#
    1919#
    20 # default_ld_version 
     20# default_ld_version
    2121#       extract and print the version number of ld
    2222#
     
    2828        exit 1
    2929    }
    30    
     30
    3131    catch "exec $ld --version" tmp
    3232    set tmp [prune_warnings $tmp]
     
    3838
    3939#
    40 # default_ld_relocate 
     40# default_ld_relocate
    4141#       link an object using relocation
    4242#
     
    4444    global HOSTING_EMU
    4545    global host_triplet
    46    
     46
    4747    if { [which $ld] == 0 } then {
    4848        perror "$ld does not exist"
    4949        return 0
    5050    }
    51    
     51
    5252    verbose -log "$ld $HOSTING_EMU -o $target -r $objects"
    53    
     53
    5454    catch "exec $ld $HOSTING_EMU -o $target -r $objects" exec_output
    5555    set exec_output [prune_warnings $exec_output]
     
    8989
    9090proc big_or_little_endian {} {
    91    
     91
    9292    if [board_info [target_info name] exists multilib_flags] {
    9393        set tmp_flags " [board_info [target_info name] multilib_flags]";
     
    9595        foreach x $tmp_flags {
    9696            case $x in {
    97                 {*big*endian eb EB -eb -EB} {
     97                {*big*endian eb EB -eb -EB -mb} {
    9898                    set flags " -EB"
    9999                    return $flags
    100100                }
    101                 {*little*endian el EL -el -EL} {
     101                {*little*endian el EL -el -EL -ml} {
    102102                    set flags " -EL"
    103103                    return $flags
     
    112112
    113113#
    114 # default_ld_link 
     114# default_ld_link
    115115#       link a program using ld
    116116#
     
    122122    global host_triplet
    123123    global link_output
    124    
     124
    125125    set objs "$HOSTING_CRT0 $objects"
    126126    set libs "$LIBS $HOSTING_LIBS"
    127    
     127
    128128    if { [which $ld] == 0 } then {
    129129        perror "$ld does not exist"
     
    137137    }
    138138    verbose -log "$ld $HOSTING_EMU $flags -o $target $objs $libs"
    139    
     139
    140140    catch "exec $ld $HOSTING_EMU $flags -o $target $objs $libs" link_output
    141141    set exec_output [prune_warnings $link_output]
     
    149149
    150150#
    151 # default_ld_simple_link 
     151# default_ld_simple_link
    152152#       link a program using ld, without including any libraries
    153153#
     
    160160        return 0
    161161    }
    162    
     162
    163163    if [is_endian_output_format $objects] then {
    164164        set flags [big_or_little_endian]
     
    166166        set flags ""
    167167    }
    168    
     168
    169169    verbose -log "$ld $flags -o $target $objects"
    170    
     170
    171171    catch "exec $ld $flags -o $target $objects" link_output
    172172    set exec_output [prune_warnings $link_output]
     
    185185
    186186#
    187 # default_ld_compile 
     187# default_ld_compile
    188188#       compile an object using cc
    189189#
     
    257257    global ASFLAGS
    258258    global host_triplet
    259    
     259
    260260    if {[which $as] == 0} then {
    261261        perror "$as does not exist"
     
    284284#       run nm on a file, putting the result in the array nm_output
    285285#
    286 proc default_ld_nm { nm object } {
     286proc default_ld_nm { nm nmflags object } {
    287287    global NMFLAGS
    288288    global nm_output
     
    300300    if ![info exists NMFLAGS] { set NMFLAGS "" }
    301301
    302     verbose -log "$nm $NMFLAGS $object >tmpdir/nm.out"
    303 
    304     catch "exec $nm $NMFLAGS $object >tmpdir/nm.out" exec_output
     302    # Ensure consistent sorting of symbols
     303    if {[info exists env(LC_ALL)]} {
     304        set old_lc_all $env(LC_ALL)
     305    }
     306    set env(LC_ALL) "C"
     307    verbose -log "$nm $NMFLAGS $nmflags $object >tmpdir/nm.out"
     308
     309    catch "exec $nm $NMFLAGS $nmflags $object >tmpdir/nm.out" exec_output
     310    if {[info exists old_lc_all]} {
     311        set env(LC_ALL) $old_lc_all
     312    } else {
     313        unset env(LC_ALL)
     314    }
    305315    set exec_output [prune_warnings $exec_output]
    306316    if [string match "" $exec_output] then {
     
    308318        while { [gets $file line] != -1 } {
    309319            verbose "$line" 2
    310             if [regexp "^(\[0-9a-fA-F\]+) \[a-zA-Z0-9\] (.+)$" $line whole value name] {
     320            if [regexp "^(\[0-9a-fA-F\]+) \[a-zA-Z0-9\] \\.*(.+)$" $line whole value name] {
    311321                set name [string trimleft $name "_"]
    312322                verbose "Setting nm_output($name) to 0x$value" 2
     
    321331        return 0
    322332    }
     333}
     334
     335#
     336# is_elf_format
     337#       true if the object format is known to be ELF
     338#
     339proc is_elf_format {} {
     340    if { ![istarget *-*-sysv4*] \
     341         && ![istarget *-*-unixware*] \
     342         && ![istarget *-*-elf*] \
     343         && ![istarget *-*-eabi*] \
     344         && ![istarget *-*-linux*] \
     345         && ![istarget *-*-irix5*] \
     346         && ![istarget *-*-irix6*] \
     347         && ![istarget *-*-netbsd*] \
     348         && ![istarget *-*-solaris2*] } {
     349        return 0
     350    }
     351
     352    if { [istarget *-*-linux*aout*] \
     353         || [istarget *-*-linux*oldld*] } {
     354        return 0
     355    }
     356
     357    if { ![istarget *-*-netbsdelf*] \
     358         && ([istarget *-*-netbsd*aout*] \
     359             || [istarget *-*-netbsdpe*] \
     360             || [istarget arm*-*-netbsd*] \
     361             || [istarget sparc-*-netbsd*] \
     362             || [istarget i*86-*-netbsd*] \
     363             || [istarget m68*-*-netbsd*] \
     364             || [istarget vax-*-netbsd*] \
     365             || [istarget ns32k-*-netbsd*]) } {
     366        return 0
     367    }
     368    return 1
    323369}
    324370
     
    331377proc simple_diff { file_1 file_2 } {
    332378    global target
    333        
     379
    334380    set eof -1
    335381    set differences 0
    336    
     382
    337383    if [file exists $file_1] then {
    338384        set file_a [open $file_1 r]
     
    341387        return
    342388    }
    343    
     389
    344390    if [file exists $file_2] then {
    345391        set file_b [open $file_2 r]
     
    348394        return
    349395    }
    350    
     396
    351397    verbose "# Diff'ing: $file_1 $file_2\n" 2
    352    
     398
    353399    while { [gets $file_a line] != $eof } {
    354400        if [regexp "^#.*$" $line] then {
     
    359405    }
    360406    close $file_a
    361    
     407
    362408    while { [gets $file_b line] != $eof } {
    363409        if [regexp "^#.*$" $line] then {
     
    383429        }
    384430    }
    385    
     431
    386432    if { [llength $list_a] != [llength $list_b] } {
    387433        fail "Test: $target"
     
    392438        pass "Test: $target"
    393439    }
     440}
     441
     442# run_dump_test FILE
     443# Copied from gas testsuite, tweaked and further extended.
     444#
     445# Assemble a .s file, then run some utility on it and check the output.
     446#
     447# There should be an assembly language file named FILE.s in the test
     448# suite directory, and a pattern file called FILE.d.  `run_dump_test'
     449# will assemble FILE.s, run some tool like `objdump', `objcopy', or
     450# `nm' on the .o file to produce textual output, and then analyze that
     451# with regexps.  The FILE.d file specifies what program to run, and
     452# what to expect in its output.
     453#
     454# The FILE.d file begins with zero or more option lines, which specify
     455# flags to pass to the assembler, the program to run to dump the
     456# assembler's output, and the options it wants.  The option lines have
     457# the syntax:
     458#
     459#         # OPTION: VALUE
     460#
     461# OPTION is the name of some option, like "name" or "objdump", and
     462# VALUE is OPTION's value.  The valid options are described below.
     463# Whitespace is ignored everywhere, except within VALUE.  The option
     464# list ends with the first line that doesn't match the above syntax
     465# (hmm, not great for error detection).
     466#
     467# The interesting options are:
     468#
     469#   name: TEST-NAME
     470#       The name of this test, passed to DejaGNU's `pass' and `fail'
     471#       commands.  If omitted, this defaults to FILE, the root of the
     472#       .s and .d files' names.
     473#
     474#   as: FLAGS
     475#       When assembling, pass FLAGS to the assembler.
     476#       If assembling several files, you can pass different assembler
     477#       options in the "source" directives.  See below.
     478#
     479#   ld: FLAGS
     480#       Link assembled files using FLAGS, in the order of the "source"
     481#       directives, when using multiple files.
     482#
     483#   objcopy_linked_file: FLAGS
     484#       Run objcopy on the linked file with the specified flags.
     485#       This lets you transform the linked file using objcopy, before the
     486#       result is analyzed by an analyzer program specified below (which
     487#       may in turn *also* be objcopy).
     488#
     489#   PROG: PROGRAM-NAME
     490#       The name of the program to run to analyze the .o file produced
     491#       by the assembler or the linker output.  This can be omitted;
     492#       run_dump_test will guess which program to run by seeing which of
     493#       the flags options below is present.
     494#
     495#   objdump: FLAGS
     496#   nm: FLAGS
     497#   objcopy: FLAGS
     498#       Use the specified program to analyze the assembler or linker
     499#       output file, and pass it FLAGS, in addition to the output name.
     500#       Note that they are run with LC_ALL=C in the environment to give
     501#       consistent sorting of symbols.
     502#
     503#   source: SOURCE [FLAGS]
     504#       Assemble the file SOURCE.s using the flags in the "as" directive
     505#       and the (optional) FLAGS.  If omitted, the source defaults to
     506#       FILE.s.
     507#       This is useful if several .d files want to share a .s file.
     508#       More than one "source" directive can be given, which is useful
     509#       when testing linking.
     510#
     511#   xfail: TARGET
     512#       The test is expected to fail on TARGET.  This may occur more than
     513#       once.
     514#
     515#   target: TARGET
     516#       Only run the test for TARGET.  This may occur more than once; the
     517#       target being tested must match at least one.
     518#
     519#   notarget: TARGET
     520#       Do not run the test for TARGET.  This may occur more than once;
     521#       the target being tested must not match any of them.
     522#
     523#   error: REGEX
     524#       An error with message matching REGEX must be emitted for the test
     525#       to pass.  The PROG, objdump, nm and objcopy options have no
     526#       meaning and need not supplied if this is present.
     527#
     528# Each option may occur at most once unless otherwise mentioned.
     529#
     530# After the option lines come regexp lines.  `run_dump_test' calls
     531# `regexp_diff' to compare the output of the dumping tool against the
     532# regexps in FILE.d.  `regexp_diff' is defined later in this file; see
     533# further comments there.
     534
     535proc run_dump_test { name } {
     536    global subdir srcdir
     537    global OBJDUMP NM AS OBJCOPY READELF LD
     538    global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS LDFLAGS
     539    global host_triplet runtests
     540    global env
     541
     542    if [string match "*/*" $name] {
     543        set file $name
     544        set name [file tail $name]
     545    } else {
     546        set file "$srcdir/$subdir/$name"
     547    }
     548
     549    if ![runtest_file_p $runtests $name] then {
     550        return
     551    }
     552
     553    set opt_array [slurp_options "${file}.d"]
     554    if { $opt_array == -1 } {
     555        perror "error reading options from $file.d"
     556        unresolved $subdir/$name
     557        return
     558    }
     559    set dumpfile tmpdir/dump.out
     560    set run_ld 0
     561    set run_objcopy 0
     562    set opts(as) {}
     563    set opts(ld) {}
     564    set opts(xfail) {}
     565    set opts(target) {}
     566    set opts(notarget) {}
     567    set opts(objdump) {}
     568    set opts(nm) {}
     569    set opts(objcopy) {}
     570    set opts(readelf) {}
     571    set opts(name) {}
     572    set opts(PROG) {}
     573    set opts(source) {}
     574    set opts(error) {}
     575    set opts(objcopy_linked_file) {}
     576    set asflags(${file}.s) {}
     577
     578    foreach i $opt_array {
     579        set opt_name [lindex $i 0]
     580        set opt_val [lindex $i 1]
     581        if ![info exists opts($opt_name)] {
     582            perror "unknown option $opt_name in file $file.d"
     583            unresolved $subdir/$name
     584            return
     585        }
     586
     587        switch -- $opt_name {
     588            xfail {}
     589            target {}
     590            notarget {}
     591            source {
     592                # Move any source-specific as-flags to a separate array to
     593                # simplify processing.
     594                if { [llength $opt_val] > 1 } {
     595                    set asflags([lindex $opt_val 0]) [lrange $opt_val 1 end]
     596                    set opt_val [lindex $opt_val 0]
     597                } else {
     598                    set asflags($opt_val) {}
     599                }
     600            }
     601            default {
     602                if [string length $opts($opt_name)] {
     603                    perror "option $opt_name multiply set in $file.d"
     604                    unresolved $subdir/$name
     605                    return
     606                }
     607
     608                # A single "# ld:" with no options should do the right thing.
     609                if { $opt_name == "ld" } {
     610                    set run_ld 1
     611                }
     612                # Likewise objcopy_linked_file.
     613                if { $opt_name == "objcopy_linked_file" } {
     614                    set run_objcopy 1
     615                }
     616            }
     617        }
     618        set opts($opt_name) [concat $opts($opt_name) $opt_val]
     619    }
     620
     621    # Decide early whether we should run the test for this target.
     622    if { [llength $opts(target)] > 0 } {
     623        set targmatch 0
     624        foreach targ $opts(target) {
     625            if [istarget $targ] {
     626                set targmatch 1
     627                break
     628            }
     629        }
     630        if { $targmatch == 0 } {
     631            return
     632        }
     633    }
     634    foreach targ $opts(notarget) {
     635        if [istarget $targ] {
     636            return
     637        }
     638    }
     639
     640    if {$opts(PROG) != ""} {
     641        switch -- $opts(PROG) {
     642            objdump
     643                { set program objdump }
     644            nm
     645                { set program nm }
     646            objcopy
     647                { set program objcopy }
     648            readelf
     649                { set program readelf }
     650            default
     651                { perror "unrecognized program option $opts(PROG) in $file.d"
     652                  unresolved $subdir/$name
     653                  return }
     654        }
     655    } elseif { $opts(error) != "" } {
     656        # It's meaningless to require an output-testing method when we
     657        # expect an error.  For simplicity, we fake an arbitrary method.
     658        set program "nm"
     659    } else {
     660        # Guess which program to run, by seeing which option was specified.
     661        set program ""
     662        foreach p {objdump objcopy nm readelf} {
     663            if {$opts($p) != ""} {
     664                if {$program != ""} {
     665                    perror "ambiguous dump program in $file.d"
     666                    unresolved $subdir/$name
     667                    return
     668                } else {
     669                    set program $p
     670                }
     671            }
     672        }
     673        if {$program == ""} {
     674            perror "dump program unspecified in $file.d"
     675            unresolved $subdir/$name
     676            return
     677        }
     678    }
     679
     680    set progopts1 $opts($program)
     681    eval set progopts \$[string toupper $program]FLAGS
     682    eval set binary \$[string toupper $program]
     683    if { $opts(name) == "" } {
     684        set testname "$subdir/$name"
     685    } else {
     686        set testname $opts(name)
     687    }
     688
     689    if { $opts(source) == "" } {
     690        set sourcefiles [list ${file}.s]
     691    } else {
     692        set sourcefiles {}
     693        foreach sf $opts(source) {
     694            if { [string match "/*" $sf] } {
     695                lappend sourcefiles "$sf"
     696            } {
     697                lappend sourcefiles "$srcdir/$subdir/$sf"
     698            }
     699            # Must have asflags indexed on source name.
     700            set asflags($srcdir/$subdir/$sf) $asflags($sf)
     701        }
     702    }
     703
     704    # Time to setup xfailures.
     705    foreach targ $opts(xfail) {
     706        setup_xfail $targ
     707    }
     708
     709    # Assemble each file.
     710    set objfiles {}
     711    for { set i 0 } { $i < [llength $sourcefiles] } { incr i } {
     712        set sourcefile [lindex $sourcefiles $i]
     713
     714        set objfile "tmpdir/dump$i.o"
     715        lappend objfiles $objfile
     716        set cmd "$AS $ASFLAGS $opts(as) $asflags($sourcefile) -o $objfile $sourcefile"
     717
     718        send_log "$cmd\n"
     719        set cmdret [catch "exec $cmd" comp_output]
     720        set comp_output [prune_warnings $comp_output]
     721
     722        # We accept errors at assembly stage too, unless we're supposed to
     723        # link something.
     724        if { $cmdret != 0 || ![string match "" $comp_output] } then {
     725            send_log "$comp_output\n"
     726            verbose "$comp_output" 3
     727            if { $opts(error) != "" && $run_ld == 0 } {
     728                if [regexp $opts(error) $comp_output] {
     729                    pass $testname
     730                    return
     731                }
     732            }
     733            fail $testname
     734            return
     735        }
     736    }
     737
     738    # Perhaps link the file(s).
     739    if { $run_ld } {
     740        set objfile "tmpdir/dump"
     741
     742        # Add -L$srcdir/$subdir so that the linker command can use
     743        # linker scripts in the source directory.
     744        set cmd "$LD $LDFLAGS -L$srcdir/$subdir \
     745                   $opts(ld) -o $objfile $objfiles"
     746
     747        send_log "$cmd\n"
     748        set cmdret [catch "exec $cmd" comp_output]
     749        set comp_output [prune_warnings $comp_output]
     750
     751        if { $cmdret != 0 || ![string match "" $comp_output] } then {
     752            verbose -log "failed with: <$comp_output>, expected: <$opts(error)>"
     753            send_log "$comp_output\n"
     754            verbose "$comp_output" 3
     755            if { $opts(error) != "" && $run_objcopy == 0 } {
     756                if [regexp $opts(error) $comp_output] {
     757                    pass $testname
     758                    return
     759                }
     760            }
     761            fail $testname
     762            return
     763        }
     764
     765        if { $run_objcopy } {
     766            set infile $objfile
     767            set objfile "tmpdir/dump1"
     768
     769            # Note that we don't use OBJCOPYFLAGS here; any flags must be
     770            # explicitly specified.
     771            set cmd "$OBJCOPY $opts(objcopy_linked_file) $infile $objfile"
     772
     773            send_log "$cmd\n"
     774            set cmdret [catch "exec $cmd" comp_output]
     775            set comp_output [prune_warnings $comp_output]
     776
     777            if { $cmdret != 0 || ![string match "" $comp_output] } then {
     778                verbose -log "failed with: <$comp_output>, expected: <$opts(error)>"
     779                send_log "$comp_output\n"
     780                verbose "$comp_output" 3
     781                if { $opts(error) != "" } {
     782                    if [regexp $opts(error) $comp_output] {
     783                        pass $testname
     784                        return
     785                    }
     786                }
     787                fail $testname
     788                return
     789            }
     790        }
     791    } else {
     792        set objfile "tmpdir/dump0.o"
     793    }
     794
     795    # We must not have expected failure if we get here.
     796    if { $opts(error) != "" } {
     797        fail $testname
     798        return
     799    }
     800
     801    if { [which $binary] == 0 } {
     802        untested $testname
     803        return
     804    }
     805
     806    if { $progopts1 == "" } { set $progopts1 "-r" }
     807    verbose "running $binary $progopts $progopts1" 3
     808
     809    # Objcopy, unlike the other two, won't send its output to stdout,
     810    # so we have to run it specially.
     811    set cmd "$binary $progopts $progopts1 $objfile > $dumpfile"
     812    if { $program == "objcopy" } {
     813        set cmd "$binary $progopts $progopts1 $objfile $dumpfile"
     814    }
     815
     816    # Ensure consistent sorting of symbols
     817    if {[info exists env(LC_ALL)]} {
     818        set old_lc_all $env(LC_ALL)
     819    }
     820    set env(LC_ALL) "C"
     821    send_log "$cmd\n"
     822    catch "exec $cmd" comp_output
     823    if {[info exists old_lc_all]} {
     824        set env(LC_ALL) $old_lc_all
     825    } else {
     826        unset env(LC_ALL)
     827    }
     828    set comp_output [prune_warnings $comp_output]
     829    if ![string match "" $comp_output] then {
     830        send_log "$comp_output\n"
     831        fail $testname
     832        return
     833    }
     834
     835    verbose_eval {[file_contents $dumpfile]} 3
     836    if { [regexp_diff $dumpfile "${file}.d"] } then {
     837        fail $testname
     838        verbose "output is [file_contents $dumpfile]" 2
     839        return
     840    }
     841
     842    pass $testname
     843}
     844
     845proc slurp_options { file } {
     846    if [catch { set f [open $file r] } x] {
     847        #perror "couldn't open `$file': $x"
     848        perror "$x"
     849        return -1
     850    }
     851    set opt_array {}
     852    # whitespace expression
     853    set ws  {[  ]*}
     854    set nws {[^         ]*}
     855    # whitespace is ignored anywhere except within the options list;
     856    # option names are alphabetic plus underscore only.
     857    set pat "^#${ws}(\[a-zA-Z_\]*)$ws:${ws}(.*)$ws\$"
     858    while { [gets $f line] != -1 } {
     859        set line [string trim $line]
     860        # Whitespace here is space-tab.
     861        if [regexp $pat $line xxx opt_name opt_val] {
     862            # match!
     863            lappend opt_array [list $opt_name $opt_val]
     864        } else {
     865            break
     866        }
     867    }
     868    close $f
     869    return $opt_array
     870}
     871
     872# regexp_diff, copied from gas, based on simple_diff above.
     873#       compares two files line-by-line
     874#       file1 contains strings, file2 contains regexps and #-comments
     875#       blank lines are ignored in either file
     876#       returns non-zero if differences exist
     877#
     878proc regexp_diff { file_1 file_2 } {
     879
     880    set eof -1
     881    set end_1 0
     882    set end_2 0
     883    set differences 0
     884    set diff_pass 0
     885
     886    if [file exists $file_1] then {
     887        set file_a [open $file_1 r]
     888    } else {
     889        warning "$file_1 doesn't exist"
     890        return 1
     891    }
     892
     893    if [file exists $file_2] then {
     894        set file_b [open $file_2 r]
     895    } else {
     896        fail "$file_2 doesn't exist"
     897        close $file_a
     898        return 1
     899    }
     900
     901    verbose " Regexp-diff'ing: $file_1 $file_2" 2
     902
     903    while { 1 } {
     904        set line_a ""
     905        set line_b ""
     906        while { [string length $line_a] == 0 } {
     907            if { [gets $file_a line_a] == $eof } {
     908                set end_1 1
     909                break
     910            }
     911        }
     912        while { [string length $line_b] == 0 || [string match "#*" $line_b] } {
     913            if [ string match "#pass" $line_b ] {
     914                set end_2 1
     915                set diff_pass 1
     916                break
     917            } elseif [ string match "#..." $line_b ] {
     918                if { [gets $file_b line_b] == $eof } {
     919                    set end_2 1
     920                    break
     921                }
     922                verbose "looking for \"^$line_b$\"" 3
     923                while { ![regexp "^$line_b$" "$line_a"] } {
     924                    verbose "skipping    \"$line_a\"" 3
     925                    if { [gets $file_a line_a] == $eof } {
     926                        set end_1 1
     927                        break
     928                    }
     929                }
     930                break
     931            }
     932            if { [gets $file_b line_b] == $eof } {
     933                set end_2 1
     934                break
     935            }
     936        }
     937
     938        if { $diff_pass } {
     939            break
     940        } elseif { $end_1 && $end_2 } {
     941            break
     942        } elseif { $end_1 } {
     943            send_log "extra regexps in $file_2 starting with \"^$line_b$\"\nEOF from $file_1\n"
     944            verbose "extra regexps in $file_2 starting with \"^$line_b$\"\nEOF from $file_1" 3
     945            set differences 1
     946            break
     947        } elseif { $end_2 } {
     948            send_log "extra lines in $file_1 starting with \"^$line_a$\"\nEOF from $file_2\n"
     949            verbose "extra lines in $file_1 starting with \"^$line_a$\"\nEOF from $file_2\n" 3
     950            set differences 1
     951            break
     952        } else {
     953            verbose "regexp \"^$line_b$\"\nline   \"$line_a\"" 3
     954            if ![regexp "^$line_b$" "$line_a"] {
     955                send_log "regexp_diff match failure\n"
     956                send_log "regexp \"^$line_b$\"\nline   \"$line_a\"\n"
     957                set differences 1
     958            }
     959        }
     960    }
     961
     962    if { $differences == 0 && !$diff_pass && [eof $file_a] != [eof $file_b] } {
     963        send_log "$file_1 and $file_2 are different lengths\n"
     964        verbose "$file_1 and $file_2 are different lengths" 3
     965        set differences 1
     966    }
     967
     968    close $file_a
     969    close $file_b
     970
     971    return $differences
     972}
     973
     974proc file_contents { filename } {
     975    set file [open $filename r]
     976    set contents [read $file]
     977    close $file
     978    return $contents
     979}
     980
     981# List contains test-items with 3 items followed by 2 lists, one item and
     982# one optional item:
     983# 0:name 1:ld options 2:assembler options
     984# 3:filenames of assembler files 4: action and options. 5: name of output file
     985# 6:compiler flags (optional)
     986
     987# Actions:
     988# objdump: Apply objdump options on result.  Compare with regex (last arg).
     989# nm: Apply nm options on result.  Compare with regex (last arg).
     990# readelf: Apply readelf options on result.  Compare with regex (last arg).
     991
     992proc run_ld_link_tests { ldtests } {
     993    global ld
     994    global as
     995    global nm
     996    global objdump
     997    global READELF
     998    global srcdir
     999    global subdir
     1000    global env
     1001    global CC
     1002    global CFLAGS
     1003
     1004    foreach testitem $ldtests {
     1005        set testname [lindex $testitem 0]
     1006        set ld_options [lindex $testitem 1]
     1007        set as_options [lindex $testitem 2]
     1008        set src_files  [lindex $testitem 3]
     1009        set actions [lindex $testitem 4]
     1010        set binfile tmpdir/[lindex $testitem 5]
     1011        set cflags [lindex $testitem 6]
     1012        set objfiles {}
     1013        set is_unresolved 0
     1014        set failed 0
     1015
     1016#       verbose -log "Testname is $testname"
     1017#       verbose -log "ld_options is $ld_options"
     1018#       verbose -log "as_options is $as_options"
     1019#       verbose -log "src_files is $src_files"
     1020#       verbose -log "actions is $actions"
     1021#       verbose -log "binfile is $binfile"
     1022
     1023        # Assemble each file in the test.
     1024        foreach src_file $src_files {
     1025            set objfile "tmpdir/[file rootname $src_file].o"
     1026            lappend objfiles $objfile
     1027
     1028            if { [file extension $src_file] == ".c" } {
     1029                set as_file "tmpdir/[file rootname $src_file].s"
     1030                if ![ld_compile "$CC -S $CFLAGS $cflags" $srcdir/$subdir/$src_file $as_file] {
     1031                    set is_unresolved 1
     1032                    break
     1033                }
     1034            } else {
     1035                set as_file "$srcdir/$subdir/$src_file"
     1036            }
     1037            if ![ld_assemble $as "$as_options $as_file" $objfile] {
     1038                set is_unresolved 1
     1039                break
     1040            }
     1041        }
     1042
     1043        # Catch assembler errors.
     1044        if { $is_unresolved != 0 } {
     1045            unresolved $testname
     1046            continue
     1047        }
     1048
     1049        if ![ld_simple_link $ld $binfile "-L$srcdir/$subdir $ld_options $objfiles"] {
     1050            fail $testname
     1051        } else {
     1052            set failed 0
     1053            foreach actionlist $actions {
     1054                set action [lindex $actionlist 0]
     1055                set progopts [lindex $actionlist 1]
     1056
     1057                # There are actions where we run regexp_diff on the
     1058                # output, and there are other actions (presumably).
     1059                # Handling of the former look the same.
     1060                set dump_prog ""
     1061                switch -- $action {
     1062                    objdump
     1063                        { set dump_prog $objdump }
     1064                    nm
     1065                        { set dump_prog $nm }
     1066                    readelf
     1067                        { set dump_prog $READELF }
     1068                    default
     1069                        {
     1070                            perror "Unrecognized action $action"
     1071                            set is_unresolved 1
     1072                            break
     1073                        }
     1074                    }
     1075
     1076                if { $dump_prog != "" } {
     1077                    set dumpfile [lindex $actionlist 2]
     1078                    set binary $dump_prog
     1079
     1080                    # Ensure consistent sorting of symbols
     1081                    if {[info exists env(LC_ALL)]} {
     1082                        set old_lc_all $env(LC_ALL)
     1083                    }
     1084                    set env(LC_ALL) "C"
     1085                    set cmd "$binary $progopts $binfile > dump.out"
     1086                    send_log "$cmd\n"
     1087                    catch "exec $cmd" comp_output
     1088                    if {[info exists old_lc_all]} {
     1089                        set env(LC_ALL) $old_lc_all
     1090                    } else {
     1091                        unset env(LC_ALL)
     1092                    }
     1093                    set comp_output [prune_warnings $comp_output]
     1094
     1095                    if ![string match "" $comp_output] then {
     1096                        send_log "$comp_output\n"
     1097                        set failed 1
     1098                        break
     1099                    }
     1100
     1101                    if { [regexp_diff "dump.out" "$srcdir/$subdir/$dumpfile"] } then {
     1102                        verbose "output is [file_contents "dump.out"]" 2
     1103                        set failed 1
     1104                        break
     1105                    }
     1106                }
     1107            }
     1108
     1109            if { $failed != 0 } {
     1110                fail $testname
     1111            } else { if { $is_unresolved == 0 } {
     1112                pass $testname
     1113            } }
     1114        }
     1115
     1116        # Catch action errors.
     1117        if { $is_unresolved != 0 } {
     1118            unresolved $testname
     1119            continue
     1120        }
     1121    }
     1122}
     1123
     1124
     1125proc verbose_eval { expr { level 1 } } {
     1126    global verbose
     1127    if $verbose>$level then { eval verbose "$expr" $level }
    3941128}
    3951129
Note: See TracChangeset for help on using the changeset viewer.