This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: ld/testsuite/ld-selective to handle g++ V3 ABI


On Tue, Jul 24, 2001 at 04:59:30AM -0500, Loren James Rittle wrote:
> 	* ld-selective/selective.exp: Support g++ V3 ABI (along side
> 	the old ABI).  Make comparisons against normalized (to
> 	V3-style) demangled nm output.

Yay!  Applying..
>   
> +     # Make nm demangle names (this is the best I found without changing API)
> +     global NMFLAGS
> +     set OLDNMFLAGS "$NMFLAGS"
> +     set NMFLAGS "$NMFLAGS --demangle"
> +     
>       if ![ld_nm $nm $ldfile] {
>   	unresolved $testname
>   	continue
> +     }
> + 
> +     set NMFLAGS "$OLDNMFLAGS"

Except for this bit.  Instead, I applied this patch first.

ld/testsuite/ChangeLog
	* 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.

-- 
Alan Modra

Index: testsuite/config/default.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/config/default.exp,v
retrieving revision 1.3
diff -u -p -r1.3 default.exp
--- default.exp	2001/06/13 03:08:20	1.3
+++ default.exp	2001/07/24 10:58:54
@@ -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
 }
 
 #
Index: testsuite/ld-empic/empic.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-empic/empic.exp,v
retrieving revision 1.2
diff -u -p -r1.2 empic.exp
--- empic.exp	2001/03/13 06:14:28	1.2
+++ empic.exp	2001/07/24 10:58:54
@@ -60,7 +60,7 @@ if ![ld_simple_link $ld tmpdir/relax "--
     # 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
     }
Index: testsuite/ld-scripts/defined.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/defined.exp,v
retrieving revision 1.2
diff -u -p -r1.2 defined.exp
--- defined.exp	2001/03/13 06:14:28	1.2
+++ defined.exp	2001/07/24 10:58:54
@@ -28,7 +28,7 @@ if ![ld_assemble $as $srcdir/$subdir/def
 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)] \
Index: testsuite/ld-scripts/script.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/script.exp,v
retrieving revision 1.4
diff -u -p -r1.4 script.exp
--- script.exp	2001/03/13 06:14:28	1.4
+++ script.exp	2001/07/24 10:58:54
@@ -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)] \
Index: testsuite/ld-scripts/sizeof.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/sizeof.exp,v
retrieving revision 1.2
diff -u -p -r1.2 sizeof.exp
--- sizeof.exp	2001/03/13 06:14:28	1.2
+++ sizeof.exp	2001/07/24 10:58:54
@@ -30,7 +30,7 @@ if ![ld_simple_link $ld tmpdir/sizeof "-
     return
 }
 
-if ![ld_nm $nm tmpdir/sizeof] {
+if ![ld_nm $nm "" tmpdir/sizeof] {
     unresolved $testname
     return
 }
Index: testsuite/ld-selective/selective.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-selective/selective.exp,v
retrieving revision 1.16
diff -u -p -r1.16 selective.exp
--- selective.exp	2001/07/12 15:03:27	1.16
+++ selective.exp	2001/07/24 10:58:54
@@ -106,7 +106,7 @@ foreach testitem $seltests {
 	continue
     }
 
-    if ![ld_nm $nm $ldfile] {
+    if ![ld_nm $nm "" $ldfile] {
 	unresolved $testname
 	continue
     }
Index: testsuite/ld-sh/sh.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-sh/sh.exp,v
retrieving revision 1.4
diff -u -p -r1.4 sh.exp
--- sh.exp	2001/05/28 10:55:23	1.4
+++ sh.exp	2001/07/24 10:58:54
@@ -32,7 +32,7 @@ if ![ld_assemble $as "-relax $srcdir/$su
 } 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)] \
Index: testsuite/lib/ld-lib.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/lib/ld-lib.exp,v
retrieving revision 1.9
diff -u -p -r1.9 ld-lib.exp
--- ld-lib.exp	2001/06/13 03:08:21	1.9
+++ ld-lib.exp	2001/07/24 10:58:55
@@ -283,7 +283,7 @@ proc default_ld_assemble { as source obj
 # 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]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]