summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-selective
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2001-07-24 11:09:24 +0000
committerAlan Modra <amodra@bigpond.net.au>2001-07-24 11:09:24 +0000
commit24c994238c13d7fa6d8ef4a1339e03d086ab26fc (patch)
tree76a98e076c6f07f490b4d1a492e91788800aa5b1 /ld/testsuite/ld-selective
parent746476dc0f995b12dd4403ec12a8aabb7e699663 (diff)
downloadbinutils-redhat-24c994238c13d7fa6d8ef4a1339e03d086ab26fc.tar.gz
* ld-selective/selective.exp: Support g++ V3 ABI (along side
the old ABI). Make comparisons against normalized (to V3-style) demangled nm output.
Diffstat (limited to 'ld/testsuite/ld-selective')
-rw-r--r--ld/testsuite/ld-selective/selective.exp16
1 files changed, 12 insertions, 4 deletions
diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp
index 7e9d3b133a..34ea32d408 100644
--- a/ld/testsuite/ld-selective/selective.exp
+++ b/ld/testsuite/ld-selective/selective.exp
@@ -41,9 +41,10 @@ set seltests {
{selective1 C 1.c {} {} {dropme1 dropme2} {alpha*-*}}
{selective2 C 2.c {} {} {foo} {alpha*-* mips*-*}}
{selective3 C 2.c {-u foo} {foo} {{foo 0}} {mips*-*}}
- {selective4 C++ 3.cc {} {start foo__1A foo__1B} {bar__1A} {alpha*-* mips*-*}}
- {selective5 C++ 4.cc {} {} {foo__1B foo__1A} {alpha*-* mips*-*}}
- {selective6 C++ 5.cc {} {} {foo__1B foo__1A dropme1__Fv dropme2__Fv} {*-*-*}}
+ {selective4 C++ 3.cc {} {start a A::foo() B::foo()} {A::bar()} {mips*-*}}
+ {selective5 C++ 4.cc {} {start a A::bar()} {A::foo() B::foo()} {mips*-*}}
+ {selective6 C++ 5.cc {} {start a A::bar()}
+ {A::foo() B::foo() dropme1() dropme2()} {*-*-*}}
}
set cflags "-w -O -ffunction-sections -fdata-sections"
@@ -106,11 +107,18 @@ foreach testitem $seltests {
continue
}
- if ![ld_nm $nm "" $ldfile] {
+ if ![ld_nm $nm --demangle $ldfile] {
unresolved $testname
continue
}
+ # Must make V2 demangled names look like V3
+ foreach nm_output_key [array names nm_output] {
+ if [regsub \\(void\\) $nm_output_key () new_nm_output_key] {
+ set nm_output($new_nm_output_key) nm_output($nm_output_key)
+ }
+ }
+
# Check each mandated symbol and optionally mandated values.
foreach mustsym $mustsyms {
if { [llength [concat $mustsym]] == 1 } {