From 992c450de818e9063b013fde2da43db163cc1966 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 24 Jul 2001 11:07:16 +0000 Subject: [PATCH] * config/default.exp (ld_nm): Add "nmflags" arg. * lib/ld-lib.exp (default_ld_nm): Likewise. * ld-empic/empic.exp: Adjust call to ld_nm. * ld-scripts/defined.exp: Likewise. * ld-scripts/script.exp: Likewise. * ld-scripts/sizeof.exp: Likewise. * ld-selective/selective.exp: Likewise. * ld-sh/sh.exp: Likewise. --- ld/testsuite/ChangeLog | 11 +++++++++++ ld/testsuite/config/default.exp | 4 ++-- ld/testsuite/ld-empic/empic.exp | 2 +- ld/testsuite/ld-scripts/defined.exp | 2 +- ld/testsuite/ld-scripts/script.exp | 2 +- ld/testsuite/ld-scripts/sizeof.exp | 2 +- ld/testsuite/ld-selective/selective.exp | 2 +- ld/testsuite/ld-sh/sh.exp | 2 +- ld/testsuite/lib/ld-lib.exp | 6 +++--- 9 files changed, 22 insertions(+), 11 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 139d8d9..e36213f 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2001-07-24 Alan Modra + + * config/default.exp (ld_nm): Add "nmflags" arg. + * lib/ld-lib.exp (default_ld_nm): Likewise. + * ld-empic/empic.exp: Adjust call to ld_nm. + * ld-scripts/defined.exp: Likewise. + * ld-scripts/script.exp: Likewise. + * ld-scripts/sizeof.exp: Likewise. + * ld-selective/selective.exp: Likewise. + * ld-sh/sh.exp: Likewise. + 2001-07-12 H.J. Lu * ld-selective/selective.exp: Mark selective1, selective2, diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp index 9363c39..7892951 100644 --- a/ld/testsuite/config/default.exp +++ b/ld/testsuite/config/default.exp @@ -158,8 +158,8 @@ proc ld_assemble { as source object } { # ld_nm # run nm on a file # -proc ld_nm { nm object } { - default_ld_nm $nm $object +proc ld_nm { nm nmflags object } { + default_ld_nm $nm $nmflags $object } # diff --git a/ld/testsuite/ld-empic/empic.exp b/ld/testsuite/ld-empic/empic.exp index 2046970..f72b1f3 100644 --- a/ld/testsuite/ld-empic/empic.exp +++ b/ld/testsuite/ld-empic/empic.exp @@ -60,7 +60,7 @@ if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir/$subdir/relax.t tmpdir/ # computes the start of the function. # Get the symbol table. - if ![ld_nm $nm tmpdir/relax] { + if ![ld_nm $nm "" tmpdir/relax] { unresolved $testname return } diff --git a/ld/testsuite/ld-scripts/defined.exp b/ld/testsuite/ld-scripts/defined.exp index eb416df..075bf56 100644 --- a/ld/testsuite/ld-scripts/defined.exp +++ b/ld/testsuite/ld-scripts/defined.exp @@ -28,7 +28,7 @@ if ![ld_assemble $as $srcdir/$subdir/defined.s tmpdir/def.o] { if ![ld_simple_link $ld tmpdir/def "-T $srcdir/$subdir/defined.t tmpdir/def.o"] { fail $testname } else { - if ![ld_nm $nm tmpdir/def] { + if ![ld_nm $nm "" tmpdir/def] { unresolved $testname } else { if {![info exists nm_output(value1)] \ diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp index d810851..a7f6bad 100644 --- a/ld/testsuite/ld-scripts/script.exp +++ b/ld/testsuite/ld-scripts/script.exp @@ -29,7 +29,7 @@ proc check_script { } { global testname global nm_output - if ![ld_nm $nm tmpdir/script] { + if ![ld_nm $nm "" tmpdir/script] { unresolved $testname } else { if {![info exists nm_output(text_start)] \ diff --git a/ld/testsuite/ld-scripts/sizeof.exp b/ld/testsuite/ld-scripts/sizeof.exp index 4b7b024..5bb957a 100644 --- a/ld/testsuite/ld-scripts/sizeof.exp +++ b/ld/testsuite/ld-scripts/sizeof.exp @@ -30,7 +30,7 @@ if ![ld_simple_link $ld tmpdir/sizeof "-T $srcdir/$subdir/sizeof.t tmpdir/sizeof return } -if ![ld_nm $nm tmpdir/sizeof] { +if ![ld_nm $nm "" tmpdir/sizeof] { unresolved $testname return } diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp index 27ff2d8..7e9d3b1 100644 --- a/ld/testsuite/ld-selective/selective.exp +++ b/ld/testsuite/ld-selective/selective.exp @@ -106,7 +106,7 @@ foreach testitem $seltests { continue } - if ![ld_nm $nm $ldfile] { + if ![ld_nm $nm "" $ldfile] { unresolved $testname continue } diff --git a/ld/testsuite/ld-sh/sh.exp b/ld/testsuite/ld-sh/sh.exp index 437f7ce..cfbc02c 100644 --- a/ld/testsuite/ld-sh/sh.exp +++ b/ld/testsuite/ld-sh/sh.exp @@ -32,7 +32,7 @@ if ![ld_assemble $as "-relax $srcdir/$subdir/sh1.s" tmpdir/sh1.o] { } else { if ![ld_simple_link $ld tmpdir/sh1 "-relax tmpdir/sh1.o"] { fail $testsimple } else { - if ![ld_nm $nm tmpdir/sh1] { + if ![ld_nm $nm "" tmpdir/sh1] { unresolved $testsimple } else { if {![info exists nm_output(bar)] \ diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index bd8d211..6c35bb2 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -283,7 +283,7 @@ proc default_ld_assemble { as source object } { # default_ld_nm # run nm on a file, putting the result in the array nm_output # -proc default_ld_nm { nm object } { +proc default_ld_nm { nm nmflags object } { global NMFLAGS global nm_output global host_triplet @@ -299,9 +299,9 @@ proc default_ld_nm { nm object } { if ![info exists NMFLAGS] { set NMFLAGS "" } - verbose -log "$nm $NMFLAGS $object >tmpdir/nm.out" + verbose -log "$nm $NMFLAGS $nmflags $object >tmpdir/nm.out" - catch "exec $nm $NMFLAGS $object >tmpdir/nm.out" exec_output + catch "exec $nm $NMFLAGS $nmflags $object >tmpdir/nm.out" exec_output set exec_output [prune_warnings $exec_output] if [string match "" $exec_output] then { set file [open tmpdir/nm.out r] -- 2.7.4