aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-selective
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-07-24 11:09:24 +0000
committerAlan Modra <amodra@gmail.com>2001-07-24 11:09:24 +0000
commit067f20748083e4ab752331262c59b9e8e0b091ca (patch)
tree7e1c007170d1f028a088381b9fc4eb5f0ae29ddb /ld/testsuite/ld-selective
parent992c450de818e9063b013fde2da43db163cc1966 (diff)
downloadgdb-067f20748083e4ab752331262c59b9e8e0b091ca.zip
gdb-067f20748083e4ab752331262c59b9e8e0b091ca.tar.gz
gdb-067f20748083e4ab752331262c59b9e8e0b091ca.tar.bz2
* 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 7e9d3b1..34ea32d 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 } {