diff options
Diffstat (limited to 'ld/testsuite/ld-elfvers/vers.exp')
-rw-r--r-- | ld/testsuite/ld-elfvers/vers.exp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp index 68b5b08..3d642bc 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -351,6 +351,11 @@ proc objdump_dynsymstuff { objdump object expectfile } { } close $file_b + # Support empty files. + if { ![info exists list_a] && ![info exists list_b] } then { + return 1 + } + for { set i 0 } { $i < [llength $list_b] } { incr i } { set line_b [lindex $list_b $i] @@ -446,6 +451,11 @@ proc objdump_versionstuff { objdump object expectfile } { close $f1 close $f2 + # Support empty expected file. + if [string match "" $l2] then { + return 1 + } + verbose -log "Did not find \"$l2\"" set f1 [open $tmpdir/objdump.out r] while { [gets $f1 l1] != -1 } { @@ -863,3 +873,8 @@ run_ld_link_tests [list "\"vers24c\" \"-shared --version-script $srcdir/$subdir/vers24.map\" \"$as_pic_flags\" {vers24c.c} { { readelf -Wrs vers24.rd } } \"libvers24c.so\" \"-fpic\""] + +# Test versioned definition vs. normal definition in different files. +build_vers_lib "vers25a" vers25a.c vers25a "" vers25a.map vers25a.ver vers25a.dsym "" +build_vers_lib "vers25b1" vers25b.c vers25b1 "vers25a.o vers25a.so" "" vers25b.ver vers25b.dsym "" +build_vers_lib "vers25b2" vers25b.c vers25b2 "vers25a.so vers25a.o" "" vers25b.ver vers25b.dsym "" |